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
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
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
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
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
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
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
5aee1ecd09
Initial playSplitHand implementation
2022-02-22 13:03:35 -06:00
Mitch Peck
1592263258
Update player with split fields, stub out playSplit, and playSplit tests
2022-02-19 18:06:20 -06:00
Mitch Peck
5f28cd03fe
Implement compareHands method, add compareHands tests and fix UserIO Test
2022-02-18 19:35:54 -06:00
Dave Burke
db1e32a314
Use double to store bets
...
The original basic allowed fractional bets.
2022-02-11 13:02:22 -06:00
Dave Burke
df86d49bb7
Fix print call syntax
2022-02-11 12:37:15 -06:00
Dave Burke
5c998f3bb5
Add TODO to use fractions for bets
2022-02-11 12:37:09 -06:00
Dave Burke
a6cf574479
Add notes about insurance
2022-02-09 21:51:31 -06:00
Dave Burke
f65c2de058
Add comments and tasks
2022-02-09 21:40:27 -06:00
Dave Burke
2b2f9327f7
Implement play() and scoreHand()
2022-02-09 21:19:04 -06:00
Dave Burke
0b1f57ae4f
Refactor to allow testing side effects
...
By externalizing the source of i/o and randomness for shuffling, we can
inject non-interactive and deterministic behavior during unit tests.
2022-02-07 21:59:02 -06:00