Skip to content

Commit 6d61c4d

Browse files
committed
real_shoe
1 parent 8049acf commit 6d61c4d

15 files changed

Lines changed: 1430 additions & 1408 deletions

Makefile.am

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@ blackjack_SOURCES = \
2626
src/conf.cpp \
2727
src/report.cpp \
2828
src/version.cpp \
29-
src/blackjack.cpp \
3029
src/cards.cpp \
3130
src/players/stdinout.cpp \
3231
src/players/tty.cpp \
3332
src/players/basic.cpp
3433

3534
noinst_HEADERS = \
3635
src/dealer.h \
37-
src/blackjack.h \
3836
src/conf.h \
3937
src/version-conf.h \
4038
src/version-vcs.h \

doc/conf.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* `cards` (@sec:cards)
44
* `cards_file` (@sec:cards_file)
55
* `dealer` (@sec:dealer)
6+
* `dealer_draws_even_if_player_busted` (@sec:dealer_draws_even_if_player_busted)
67
* `decks` (@sec:decks)
78
* `flat_bet` (@sec:flat_bet)
89
* `hands` (@sec:hands)
@@ -60,15 +61,19 @@ The dealer will continue drawing from the list of arranged cards until either
6061
b. the hand is over and `new_hand_reset_cards` is `true`, or
6162
c. `quit_when_arranged_cards_run_out` is true, in which case the program exits.
6263

64+
A zero or `XX` means a placeholder for an actual random card. So for example `JS XX AC` will give
65+
the Jack of Spades, a random card and te Ace of Clubs.
66+
67+
6368
**Default**
6469
Empty list
6570

6671
**Examples**
6772

6873
~~~
6974
cards = TH JD 6C
70-
cards = 2S 5D QS AC
71-
cards = 8D QH TC 2C KD 7S 8S TD AH 5C
75+
cards = 2S XX QS AC
76+
cards = 8D QH XX 2C KD 7S XX TD AH 5C
7277
~~~
7378

7479
# `cards_file = ` $\text{path to file}$ {#sec:cards_file}
@@ -101,6 +106,26 @@ Currently, the only valid choice is `blackjack`.
101106
dealer = blackjack
102107
~~~
103108

109+
# `dealer_draws_even_if_player_busted = ` $b$ {#sec:dealer_draws_even_if_player_busted}
110+
111+
The usual rule in casinos is that if all player busted all hands (including split hands),
112+
the dealer does not have to draw until sixteen (or soft seventeen) but the hand is finihsed
113+
and the next card in the shoe (or shuffler) is the player's first card of the next hand.
114+
Yet, this rule may distort some statistics such as dealer's bust rate because for sure
115+
he will not bust that hand.
116+
This flag can modify the dealer's behavior and, if true, the dealer will draw cards
117+
as normal even if the player had busted all her hands.
118+
119+
**Default**
120+
`false`
121+
122+
**Examples**
123+
124+
~~~
125+
dealer_draws_even_if_player_busted = false
126+
dealer_draws_even_if_player_busted = true
127+
~~~
128+
104129
# `decks = ` $n$ {#sec:decks}
105130

106131
Sets the number of decks used in the game.

doc/libreblackjack.texi

Lines changed: 47 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@documentencoding UTF-8
44

55
@setfilename blackjack.info
6-
@set UPDATED 2025-10-15
6+
@set UPDATED 2025-11-10
77
@set VERSION
88

99
@copying
@@ -31,7 +31,7 @@ Texts. A copy of the license is included in the section entitled
3131
@titlepage
3232
@title Libre@ Blackjack
3333
@author Jeremy Theler
34-
2025-10-15
34+
2025-11-10
3535
@page
3636
@vskip 0pt plus 1filll
3737
@insertcopying
@@ -1043,44 +1043,47 @@ decks = 1 # number of decks, negative means infinite
10431043
@item
10441044
@code{dealer} (sec.@ 4.1.4)
10451045
@item
1046-
@code{decks} (sec.@ 4.1.5)
1046+
@code{dealer_draws_even_if_player_busted} (sec.@ 4.1.5)
10471047
@item
1048-
@code{flat_bet} (sec.@ 4.1.6)
1048+
@code{decks} (sec.@ 4.1.6)
10491049
@item
1050-
@code{hands} (sec.@ 4.1.7)
1050+
@code{flat_bet} (sec.@ 4.1.7)
10511051
@item
1052-
@code{maximum_bet} (sec.@ 4.1.8)
1052+
@code{hands} (sec.@ 4.1.8)
10531053
@item
1054-
@code{max_incorrect_commands} (sec.@ 4.1.9)
1054+
@code{maximum_bet} (sec.@ 4.1.9)
10551055
@item
1056-
@code{new_hand_reset_cards} (sec.@ 4.1.10)
1056+
@code{max_incorrect_commands} (sec.@ 4.1.10)
10571057
@item
1058-
@code{no_insurance} (sec.@ 4.1.11)
1058+
@code{new_hand_reset_cards} (sec.@ 4.1.11)
10591059
@item
1060-
@code{number_of_burnt_cards} (sec.@ 4.1.12)
1060+
@code{no_insurance} (sec.@ 4.1.12)
10611061
@item
1062-
@code{penetration} (sec.@ 4.1.13)
1062+
@code{number_of_burnt_cards} (sec.@ 4.1.13)
10631063
@item
1064-
@code{penetration_sigma} (sec.@ 4.1.14)
1064+
@code{penetration} (sec.@ 4.1.14)
10651065
@item
1066-
@code{player} (sec.@ 4.1.15)
1066+
@code{penetration_sigma} (sec.@ 4.1.15)
10671067
@item
1068-
@code{quit_when_arranged_cards_run_out} (sec.@ 4.1.16)
1068+
@code{player} (sec.@ 4.1.16)
10691069
@item
1070-
@code{resplits} (sec.@ 4.1.17)
1070+
@code{quit_when_arranged_cards_run_out} (sec.@ 4.1.17)
10711071
@item
1072-
@code{rng_seed} (sec.@ 4.1.18)
1072+
@code{resplits} (sec.@ 4.1.18)
10731073
@item
1074-
@code{rules} (sec.@ 4.1.19)
1074+
@code{rng_seed} (sec.@ 4.1.19)
10751075
@item
1076-
@code{shuffle_every_hand} (sec.@ 4.1.20)
1076+
@code{rules} (sec.@ 4.1.20)
1077+
@item
1078+
@code{shuffle_every_hand} (sec.@ 4.1.21)
10771079
@end itemize
10781080

10791081
@menu
10801082
* @code{blackjack_pays =} @math{r}::
10811083
* @code{cards =} @math{\text{list of cards}}::
10821084
* @code{cards_file =} @math{\text{path to file}}::
10831085
* @code{dealer =} @emph{game}::
1086+
* @code{dealer_draws_even_if_player_busted =} @math{b}::
10841087
* @code{decks =} @math{n}::
10851088
* @code{flat_bet =} @math{b}::
10861089
* @code{hands =} @math{n}::
@@ -1153,14 +1156,18 @@ the hand is over and @code{new_hand_reset_cards} is @code{true}, or
11531156
program exits.
11541157
@end enumerate
11551158

1159+
A zero or @code{XX} means a placeholder for an actual random card. So
1160+
for example @code{JS XX AC} will give the Jack of Spades, a random card
1161+
and te Ace of Clubs.
1162+
11561163
@strong{Default} Empty list
11571164

11581165
@strong{Examples}
11591166

11601167
@verbatim
11611168
cards = TH JD 6C
1162-
cards = 2S 5D QS AC
1163-
cards = 8D QH TC 2C KD 7S 8S TD AH 5C
1169+
cards = 2S XX QS AC
1170+
cards = 8D QH XX 2C KD 7S XX TD AH 5C
11641171
@end verbatim
11651172

11661173
@node @code{cards_file =} @math{\text{path to file}}
@@ -1191,6 +1198,26 @@ is @code{blackjack}.
11911198
dealer = blackjack
11921199
@end verbatim
11931200

1201+
@node @code{dealer_draws_even_if_player_busted =} @math{b}
1202+
@subsection @code{dealer_draws_even_if_player_busted =} @math{b}
1203+
The usual rule in casinos is that if all player busted all hands
1204+
(including split hands), the dealer does not have to draw until sixteen
1205+
(or soft seventeen) but the hand is finihsed and the next card in the
1206+
shoe (or shuffler) is the player's first card of the next hand. Yet,
1207+
this rule may distort some statistics such as dealer's bust rate because
1208+
for sure he will not bust that hand. This flag can modify the dealer's
1209+
behavior and, if true, the dealer will draw cards as normal even if the
1210+
player had busted all her hands.
1211+
1212+
@strong{Default} @code{false}
1213+
1214+
@strong{Examples}
1215+
1216+
@verbatim
1217+
dealer_draws_even_if_player_busted = false
1218+
dealer_draws_even_if_player_busted = true
1219+
@end verbatim
1220+
11941221
@node @code{decks =} @math{n}
11951222
@subsection @code{decks =} @math{n}
11961223
Sets the number of decks used in the game. If @math{n} is zero, the

0 commit comments

Comments
 (0)