Commit Graph

20 Commits

Author SHA1 Message Date
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
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
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
373e5a1868 Acey Ducey (Python): Code Cleanup (#667) 2022-03-21 11:03:21 +01:00
Martin Thoma
83b3dc402c Python: Add type annotations 2022-03-20 19:16:39 +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
4adb34f25c Python: Fix code style issues 2022-03-11 07:44:56 +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
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
Bill Cruise
d88d3b2987 Fixed bug in acey-ducey range. 2022-01-07 15:48:09 -05:00
aviyam
5e8b3b2ad2 Fixed 2 issues:
1. Behavior of game play. New cards should be dealt every round.
2. As a result of 1, check that we have at least 3 cards for next round.
2022-01-03 12:42:36 +02:00
aviyam
daea544c5f AceyDucey in python, OO implementation.
More verbose then original game with a 'what would have happened' addition.
2022-01-02 17:14:56 +02:00
doctorgraphics
6935e24ae3 Update aceyducey.py
Correct misspelled word "assement" to "assessment"  on line 177
2022-01-01 15:20:20 -08:00
Scott Halgrim
f0f5c38c02 fix typo 2022-01-01 10:53:17 -08:00
Chris Reuter
d26dbf036a Removed spaces from top-level directory names.
Spaces tend to cause annoyances in a Unix-style shell environment.
This change fixes that.
2021-11-21 18:30:21 -05:00