Martin Thoma
0d5fffefe6
Remove code duplication
2022-04-18 22:34:23 +02:00
Martin Thoma
123e13f171
Random hint
2022-04-18 22:27:28 +02:00
Martin Thoma
423f2718f1
Hockey (Python): Implemented
2022-04-18 22:25:38 +02:00
Martin Thoma
269815bd2e
ENH: Link games
...
Also show progress summary for the different languages
2022-04-17 18:37:50 +02:00
Martin Thoma
b975ac94a9
MAINT: Update TODO.md
2022-04-17 18:25:37 +02:00
Martin Thoma
235e6484de
MAINT: Update TODO.md
2022-04-10 21:06:20 +02:00
Martin Thoma
c10f55b418
Football (Python): Added
2022-04-10 12:17:22 +02:00
Martin Thoma
9eea8403cc
DOC: Update TODO.md
2022-04-04 06:46:05 +02:00
Martin Thoma
db63ac63a5
King (Python): Implemented
2022-04-03 14:58:33 +02:00
Martin Thoma
f1bc9d8551
Civil War (Python): Fix variable names
2022-04-02 14:24:03 +02:00
Martin Thoma
e17388d072
Use NamedTuple; Fix camelCase->snake_case
2022-04-02 11:22:40 +02:00
Martin Thoma
ac184fec42
Python: Type annotations
2022-04-02 10:56:43 +02:00
Martin Thoma
c8f86531e9
Poetry (python): Remove globals
2022-04-02 09:41:38 +02:00
Martin Thoma
a561322962
Python: Add type annotations
2022-04-02 09:30:56 +02:00
Martin Thoma
624c55711c
One Check (Python): Fix bug
2022-04-02 09:29:31 +02:00
Martin Thoma
dae338c236
Civil War (Python): Fix bug + type annotations
2022-04-02 09:16:11 +02:00
Martin Thoma
68cfd1c751
Python: Add types / fix type issues
2022-04-02 09:12:13 +02:00
Martin Thoma
71bae5ded3
Evenwins (Python): Refactored
2022-04-02 09:01:47 +02:00
Martin Thoma
8b0bd1ad65
Remove unnecessary empty strings
2022-04-02 08:33:54 +02:00
Martin Thoma
a2645f97f6
Fix broken shebang
2022-04-02 08:33:31 +02:00
Martin Thoma
76802c10b1
Mugwump (Python): Add types
2022-04-02 08:26:40 +02:00
Martin Thoma
88fcd0b460
BUG: Fur Trader (Python) didn't handle error case correctly
2022-04-02 08:23:02 +02:00
Martin Thoma
4b3b991273
Use docstrings
2022-04-02 08:10:01 +02:00
Martin Thoma
c500424956
Simplify Python Code
...
print_with_tab / print_with_whitespace is trivial with Python
string formatting and was mostly used in only 2 lines.
2022-04-02 07:32:09 +02:00
Martin Thoma
3a63978d0e
Super Star Trek (Python): Introduce OOP
...
* Avoid encoding values in int; use tuples instead (the memory overhead
is OK today)
* Avoid encoding values in str, use lists instead (same story)
* Use variable names that speak for themselves
* Fix typo (NAVAGATION)
2022-04-01 17:04:14 +02:00
Martin Thoma
9972ee4073
Super Star Trek (Python): Refactoring
...
* Add 'Ship' class to group code / avoid some global variables /
avoid passing so many parameters around
* Use docstrings
2022-03-31 22:41:16 +02:00
Martin Thoma
61b5a222d1
Lunar (Python): Add type annotations
2022-03-31 12:14:17 +02:00
Martin Thoma
5fef3888eb
Hexapawn (Python): Add type annotations
2022-03-31 12:01:14 +02:00
Martin Thoma
d511a22b5e
Annotate superstartrek
2022-03-31 10:41:30 +02:00
Martin Thoma
ae0b6a5015
BUG: Hangman (Python) had a List-vs-Str comparison
...
MAINT: Add type annotations to find such issues
2022-03-31 10:33:11 +02:00
Martin Thoma
84bb11eec4
Restore acey_ducey_oo.py
...
See https://github.com/coding-horror/basic-computer-games/pull/689#pullrequestreview-925162345
2022-03-30 08:24:18 +02:00
Martin Thoma
17a75813b1
Remove tests and alternative Python implementations
...
Ad discussed here:
https://github.com/coding-horror/basic-computer-games/issues/548#issuecomment-1081008471
2022-03-29 07:02:10 +02:00
Martin Thoma
d4a1679094
Delete buildJvm directory
...
As discussed here:
https://github.com/coding-horror/basic-computer-games/issues/681#issuecomment-1079728309
2022-03-28 09:43:36 +02:00
Martin Thoma
f7bf099152
Bullseye (Python): Refactoring
...
* Use functions to structure code
* Remove 1-line function
* Use dataclass
* Replace dictionaries by a list
2022-03-26 07:05:40 +01:00
Martin Thoma
4250a83705
CI: Prevent large files from being added
2022-03-26 05:52:41 +01:00
Martin Thoma
cac0e13650
Bullfight (Python): Refactoring
...
* Add Unit Test
* Add Type Annotations
* Use variable/function names
2022-03-25 10:30:23 +01:00
Martin Thoma
c29c751d21
Checkers (Python): Check if field has valid moves
...
Introduces a new error message:
({start_x}, {start_y}) has no legal moves. Choose again.
Closes #677
Additionally, add type annotations
2022-03-24 14:44:23 +01:00
Martin Thoma
8d5e3d1d0f
Bug (Python): Refactoring
...
- Rename files to follow PEP8 convention / make them testable
- Add type annotations
- Fix Flake8 issues
- Variable naming
- Add unit test
2022-03-24 12:37:59 +01:00
Martin Thoma
054d0326ee
Boxing (Python): Rename methods for clarity
2022-03-23 21:36:24 +01:00
Martin Thoma
d1ff4bce0e
Boxing (Python): Move configuration to JSON files
2022-03-23 21:32:36 +01:00
Martin Thoma
e66d2df028
Python: Add tests for bounce and bowling
2022-03-23 18:44:52 +01:00
Martin Thoma
53adcc70d0
BUG: Fix best in Python boxing
2022-03-23 12:26:07 +01:00
Martin Thoma
8ee56f94a1
Boxing (Python): Split configuration from logic
2022-03-23 12:20:06 +01:00
Martin Thoma
9b90ba6133
STY: Adjust spaces / update Markdown TODO
2022-03-22 21:37:36 +01:00
Martin Thoma
f192a3db36
Python: Add test for 9 / 10 / 11 / 12
2022-03-22 21:26:52 +01:00
Martin Thoma
bf4ac6c3ca
Python: Add tests and type annotations
2022-03-22 11:58:30 +01:00
Martin Thoma
49ae4f4872
Amazing (Python): Code Cleanup
...
* Make more use of a Maze class
* Create a bigger maze in the test
* Group row/col variables in Position class
* Group direction variables in an Enum
2022-03-21 14:32:48 +01:00
Martin Thoma and GitHub
373e5a1868
Acey Ducey (Python): Code Cleanup ( #667 )
2022-03-21 11:03:21 +01:00
Martin Thoma and GitHub
1b1d50986b
Python: Add type annotations to all 'print' functions ( #662 )
...
* Add test to superstartrek and fixes several issues in superstartrek - I probably introduced them 🙈
* Mastermind type annotations
2022-03-21 10:41:14 +01:00
Martin Thoma and GitHub
c444da93c0
BUG: Reduce false-positives for vbnet ( #666 )
...
Closes #664
2022-03-21 09:48:27 +01:00
Martin Thoma and Alexander Wunschik
d81aaa053b
Add flake8-implicit-str-concat
2022-03-20 19:16:39 +01:00
Martin Thoma and Alexander Wunschik
83b3dc402c
Python: Add type annotations
2022-03-20 19:16:39 +01:00
Martin Thoma
cd84d6b9b1
Make empty box the default
2022-03-20 17:36:17 +01:00
Martin Thoma
5fdad42a60
Update to new languages
2022-03-20 15:23:47 +01:00
Martin Thoma
d41051f26c
Fix TODO list generation for C#
2022-03-20 12:57:33 +01:00
Martin Thoma
8de3176348
Add Python tests
2022-03-19 12:20:57 +01:00
Martin Thoma
157446f209
Don't compute code coverage on test files
2022-03-19 11:57:25 +01:00
Martin Thoma
3c3c725393
Avoid global variables
2022-03-19 10:13:47 +01:00
Martin Thoma
82cc6801b7
Acey Ducey: Fix bankroll issue
2022-03-19 10:01:20 +01:00
Martin Thoma
8495e59a8f
Python: Make code testable
...
Avoid executing code on module level as this prevents importing the
module for testing. Especially infinite loops are evil.
2022-03-19 09:54:52 +01:00
Martin Thoma
3b2739b8a2
Clean Code: Apply flake8-simplify to Python
...
Also flake8-comprehensions which was added to the CI
For flake8-simplify, there are a few false-positives,
e.g. https://github.com/MartinThoma/flake8-simplify/issues/115
2022-03-18 22:29:56 +01:00
Martin Thoma
f52d9a0e54
Clean Code: Python
...
Fix issues found by flake8-bugbear:
* Unused loop variables
* assert statements in non-test code
* mixing test code with production code
* mark one excessive test which takes ~10min to run
as 'slow'
2022-03-18 14:59:08 +01:00
Martin Thoma
030d61b85f
39_golf: Python implementation
2022-03-17 09:53:23 +01:00
Martin Thoma
dc511472da
Python: Code cleanup
2022-03-17 07:51:10 +01:00
Martin Thoma
5374569063
Python: Fix string concatenation
2022-03-15 13:57:28 +01:00
Martin Thoma
0ba0307767
Python: Fix linting issues
...
The following Flake8 issues were fixed:
* W291
* W504
* F821
* F401
* F541
* E402
* E711
2022-03-14 13:13:20 +01:00
Martin Thoma
2e957b1b27
Fix mypy issues in superstartrek
2022-03-13 08:46:55 +01:00
Martin Thoma
af88007734
Python: Fix Flake8 E722 and E741
...
Additionally:
* Use functions to group blocks of code
* Use variable names (not just one character...)
2022-03-12 08:17:03 +01:00
Martin Thoma
6dde69f274
Python: Fix Flake8 issue E712 + PEP8 variable naming
2022-03-11 21:42:23 +01:00
Martin Thoma
4adb34f25c
Python: Fix code style issues
2022-03-11 07:44:56 +01:00
Martin Thoma
e7520d62af
MAINT: Apply 'pre-commit run --all' and fix issues
2022-03-10 06:59:21 +01:00
Martin Thoma
ddacedb0b0
STY: Fix Flake8 issues
2022-03-10 06:48:51 +01:00
Martin Thoma
2350c0b13f
next try ..
2022-03-09 21:35:47 +01:00
Martin Thoma
5460cb086f
master is called main
2022-03-09 21:33:52 +01:00
Martin Thoma
a721c91557
Python: Add Continuous Integration for Python
...
There are a lot of exceptions, but it's a start.
This will ensure that no more issues get added / that issues
get fixed before the code is added
2022-03-09 21:29:06 +01:00
Martin Thoma
619d9e5253
Acey Ducey (Python): Add unit tests
...
The unit tests can be executed via:
$ pip install pytest
$ pytest .
Also a few more type annotations
2022-03-09 07:32:30 +01:00
Martin Thoma
8cf8bab742
MAINT: Add type annotations / use functions
2022-03-07 22:00:41 +01:00
Martin Thoma
74bccfc593
Make mypy --strict happy
2022-03-06 14:45:27 +01:00
Martin Thoma
e921aa95a3
Remove unnecessary code / comment
2022-03-06 13:43:22 +01:00
Martin Thoma
5040aaf2a9
Python version of Blackjack
2022-03-06 13:34:32 +01:00
Martin Thoma
e64fb6795c
MAINT: Apply pre-commit
...
Remove byte-order-marker pre-commit check as there would be
many adjustments necessary
2022-03-05 09:29:23 +01:00
Martin Thoma
ef2e2f32d2
Apply black to the 00_Utilities/markdown_todo.py
2022-03-04 15:40:55 +01:00