Commit Graph

1567 Commits

Author SHA1 Message Date
Dave Burke
dfb12751ca Add TODO to use fractions for bets 2022-02-11 12:37:09 -06:00
Dave Burke
293de38a75 Add notes about insurance 2022-02-09 21:51:31 -06:00
Dave Burke
2e87fea99f Add comments and tasks 2022-02-09 21:40:27 -06:00
Dave Burke
b9ba37c8f2 Implement play() and scoreHand() 2022-02-09 21:19:04 -06:00
Dave Burke
670a2b02be Add example i/o test 2022-02-07 21:59:02 -06:00
Dave Burke
9ff276863f 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
Dave Burke
fad187cab2 Limit number of decks to 1
The subroutine to get a card shuffles 52 cards when the deck is run
through:

100 REM--SUBROUTINE TO GET A CARD.  RESULT IS PUT IN X.
110 IF C<51 THEN 230
120 PRINT "RESHUFFLING"
130 FOR D=D TO 1 STEP -1
140 C=C-1
150 C(C)=D(D)
160 NEXT D
170 FOR C1=52 TO C STEP -1
180 C2=INT(RND(1)*(C1-C+1))+C
190 C3=C(C2)
200 C(C2)=C(C1)
210 C(C1)=C3
220 NEXT C1
230 X=C(C)
240 C=C+1
250 RETURN
2022-02-03 08:31:04 -06:00
Dave Burke
be61d65117 Implement unit tests for Blackjack Java 2022-02-02 21:36:16 -06:00
Dave Burke
875282b976 Add 10_Blackjack_java to settings.gradle 2022-02-02 20:40:59 -06:00
Mitch Peck
9736325656 Implement print initial deal 2022-02-02 19:15:37 -06:00
Mitch Peck
b6900ea332 Update Player object and initialize Players 2022-02-01 20:21:30 -06:00
Dave Burke
dc58554575 Remove a junk TODO 2022-01-25 21:25:16 -06:00
Dave Burke
6e4f8722f9 Add a couple more notes 2022-01-25 21:19:15 -06:00
Dave Burke
3b0a44b108 Add Blackjack/java outline with TODO placeholders 2022-01-25 21:16:26 -06:00
Dave Burke
5dd157e9a8 Implement shuffled deck 2022-01-23 21:36:57 -06:00
Dave Burke
de5b3bbf4c Make Card immutable 2022-01-23 21:36:42 -06:00
Dave Burke
727aa0e83e Fix imports in Player 2022-01-23 21:17:22 -06:00
Dave Burke
9bf89593c5 Make Suit an enum in Card 2022-01-23 21:17:10 -06:00
Dave Burke
04472431f3 Fix inputs to match original BASIC behavior. 2022-01-23 21:07:19 -06:00
Dave Burke
a99a931c31 Add Blackjack to buildJvm 2022-01-22 21:25:42 -06:00
Mitch Peck
6991f66012 Add Player and Card objects 2022-01-22 20:15:09 -06:00
Dave Burke
7845e3df16 Prompt for bets and add notes on classes 2022-01-21 13:01:03 -06:00
Dave Burke
2cd9b8cfb3 Formatting fixes 2022-01-21 13:00:35 -06:00
Dave Burke
41424b6ee2 Refactor input prompts
After experimenting with both versions, I find System.console() to
produce more readable code than using a Scanner.
2022-01-20 21:56:51 -06:00
Dave Burke
93ef518768 Implement instructions prompt 2022-01-18 12:55:21 -06:00
Dave Burke
d17556c3ed Add stub implementation of Blackjack in Java 2022-01-18 12:36:16 -06:00
Jeff Atwood
6426d7f4b7 Merge pull request #524 from NezumiRonin/patch-29
Create life.pl
2022-01-18 09:02:05 -08:00
Nezumi Ronin
241c1f1959 Create life.pl 2022-01-18 10:56:57 -06:00
Jeff Atwood
151edbf54e Merge pull request #523 from openback/battle_py
Add 09. Battle in python
2022-01-17 22:30:22 -08:00
Jeff Atwood
03390e2713 Merge pull request #522 from noahmpauls/main
3D Tic Tac Toe in C#
2022-01-17 22:28:41 -08:00
openback
e016f785de Add Battle in python 2022-01-18 00:26:34 -05:00
Noah Pauls
8997e53144 Merge branch '88-csharp' 2022-01-17 19:47:56 -08:00
Noah Pauls
46c80ea893 updated comments with better details 2022-01-17 19:47:44 -08:00
Noah
64967951c3 Merge branch 'coding-horror:main' into main 2022-01-17 18:07:35 -08:00
Noah Pauls
8c0f2f5f8b completed csharp version 2022-01-17 18:06:22 -08:00
Jeff Atwood
ce6dd730d2 Merge pull request #520 from zspitz/main
Simplify project structure in line with #381
2022-01-17 09:32:34 -08:00
Jeff Atwood
72e4732935 Merge pull request #521 from adokhugi/main
Kotlin implementation of the Acey Ducey game
2022-01-17 09:30:34 -08:00
Claus Volko
3c960f94ea Kotlin implementation of the Acey Ducey game 2022-01-17 17:17:34 +01:00
Zev Spitz
581d492aa5 Merge remote-tracking branch 'origin/main' 2022-01-17 15:31:43 +02:00
Zev Spitz
0a07132daf Rename some projects to match game name 2022-01-17 15:29:38 +02:00
Zev Spitz
8b03046f6d Simplify Tower (C#) folder structure 2022-01-17 15:25:01 +02:00
Zev Spitz
a851b084e4 Simplify TicTacToe (C#) folder structure 2022-01-17 15:17:54 +02:00
Zev Spitz
06bca7c653 Simplify 3-D Plot (C#) folder structure 2022-01-17 15:11:35 +02:00
Zev Spitz
e24dc3a813 Simplify Target (C#) folder strucure 2022-01-17 11:59:02 +02:00
Zev Spitz
2de884f2af Simplify StockMarket (C#) folder structure 2022-01-17 11:56:20 +02:00
Zev Spitz
d7ad215070 Simplify Stars (C#) folder structure 2022-01-17 11:52:48 +02:00
Zev Spitz
18d8903b26 Simplify Mugwump (C#) folder structure 2022-01-17 11:50:17 +02:00
Zev Spitz
58cac7061d Simplify Mastermind (C#) folder structure 2022-01-17 11:48:01 +02:00
Zev Spitz
6504a1f26e Simplify Love (C#) folder structure 2022-01-17 11:12:56 +02:00
Zev Spitz
ae5a96d400 Simplify Hurkle (C#) folder structure 2022-01-17 11:09:11 +02:00