85 Commits

Author SHA1 Message Date
Sourcery AI
71d02673a9 'Refactored by Sourcery' 2024-08-19 03:46:27 +03:00
Guido Knips
7a62098e94 Un-ignore Cargo.lock
Official cargo documentation says Cargo.lock should be
under version control for binaries (but not for libraries)

see https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries
2023-08-28 21:06:35 +02:00
JoeStrout
63af1a1066 Added MiniScript implementation of Bombardment and Bombs Away.
Also fixed a minor issue with Blackjack.
2023-07-20 15:15:02 -07:00
JoeStrout
67f0527692 Initial work on the blackjack game. Still need to handle splits and insurance. 2023-07-17 16:25:18 -07: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
Jeff Atwood
6c32fc1a3d Merge pull request #688 from AlaaSarhan/main
Blackjack in Ruby
2022-03-29 15:10:54 -05:00
Alaa Sarhan
3130a3d74d implement insurance bets 2022-03-29 21:29:00 +02:00
Alaa Sarhan
f3399cd34b test and fix splitting 2022-03-29 20:54:42 +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
Alaa Sarhan
b38cf0018a add initial implementation 2022-03-29 00:31:45 +02:00
Martin Thoma
f192a3db36 Python: Add test for 9 / 10 / 11 / 12 2022-03-22 21:26:52 +01:00
Jeff Atwood
66b5297dae Merge pull request #525 from skill-collectors/blackjack-java
Blackjack in Java
2022-03-22 13:54:30 -05:00
Jeff Atwood
f40a1fc465 add Porting Notes to readme.md for each game 2022-03-18 19:50:22 -07:00
Dave Burke
cdf194f770 Remove redundant Card record code
Java Records automatically acquire an implementation of equals and
hashCode that accounts for their components. They also have read
accessors for their components (card.suit() to get the suit).
2022-03-18 17:01:06 -05: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
Mitch Peck
0b1f809707 Clean up comments and convert Card to a record 2022-03-18 12:52:14 -05:00
Mitch Peck
88202ec9be Fix dealer initialization 2022-03-16 21:27:37 -05:00
Jeff Atwood
6f6ac93d1f Merge pull request #633 from mojoaxel/js-terminal-style
Add "nice" terminal style stylesheet for javascript html
2022-03-15 23:50:18 -05:00
Jeff Atwood
43f2ec013a add 00_Alternate_Langage folder and move alternate ports there 2022-03-15 20:49:07 -07:00
Alexander Wunschik
f2b3d6f2ed add terminal-stylesheet for javascript html 2022-03-13 11:23:05 +01:00
Mitch Peck
14123c9a4f shouldPlayDealer & playDealer implementations, formatting to mimic original code 2022-03-11 21:12:59 -06:00
Mitch Peck
34574d60cb Handle dealer's total in evaluateRound 2022-03-09 20:43:56 -06:00
Mitch Peck
5bfb8a4088 Implement evaluateRound with tests 2022-03-09 20:25:10 -06: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
Dave Burke
ca0906cbfc Handle 'an' vs 'a' grammar 2022-03-05 09:53:41 -06:00
Dave Burke
d6e0edb75f Fill out javadoc 2022-03-05 09:47:15 -06:00
Dave Burke
926612b736 Test insurance collection 2022-03-05 09:28:27 -06: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
Dave Burke
84a70ad1ff Handle insurance 2022-03-04 13:02:26 -06:00
Dave Burke
375f16c4a8 Print total after STAY 2022-03-03 22:10:54 -06:00
Dave Burke
213f77678f Mimic a real deal
Just because it's fun.
2022-03-03 22:10:54 -06:00
Dave Burke
c7e684a99a Simplify bet validation 2022-03-03 22:10:54 -06:00
Dave Burke
f7a257e6ae Refactor scoreHand and compareHands into ScoringUtils 2022-03-03 21:55:30 -06:00
Dave Burke
1f24d98a72 Make play() tests more readable 2022-03-03 21:49:47 -06:00
Dave Burke
9fac5530e4 Print total of each hand 2022-03-03 21:46:24 -06:00
Dave Burke
7e09a58f32 Fix output for Double Down 2022-03-03 21:44:42 -06:00
Dave Burke
193edaa428 Fix toString for Ace 2022-03-03 21:43:29 -06:00
Dave Burke
a8d2e12597 Add a couple TODOs 2022-03-02 22:20:41 -06:00
Dave Burke
58fd32823e Use List instead of LinkedList where possible 2022-03-02 22:16:03 -06:00
Dave Burke
5e950275fa Refactor Game.play() to handle split hands more elegantly 2022-03-02 22:15:44 -06:00
Dave Burke
ccbed873e5 Add TODO to make Card a Record 2022-03-02 22:14:56 -06:00
AnthonyMichaelTDM
23153f8cbd bug fix
dealer wasn't playing because of a logic error, fixed
2022-02-27 23:44:18 -08:00
AnthonyMichaelTDM
6ba2139574 bug fix 2022-02-27 23:37:48 -08:00
AnthonyMichaelTDM
becf0599ad update instructions 2022-02-27 23:33:01 -08:00
AnthonyMichaelTDM
8bfef01d05 10_blackjack implement doubling down 2022-02-27 23:31:43 -08:00
AnthonyMichaelTDM
13f1802601 10_blackjack rust implemented betting 2022-02-27 23:27:23 -08:00
AnthonyMichaelTDM
98da0cf49e 10_blackjack rust more improvements 2022-02-27 20:31:46 -08:00
AnthonyMichaelTDM
04de91c14c readme's added 2022-02-27 20:06:17 -08:00