33@documentencoding UTF-8
44
55@setfilename blackjack.info
6- @set UPDATED 2025-10-07
6+ @set UPDATED 2025-10-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-07
34+ 2025-10-10
3535@page
3636@vskip 0pt plus 1filll
3737@insertcopying
@@ -658,6 +658,7 @@ given as a two-character ASCII representation where the first
658658character@ @math {r } indicates the rank and the second
659659character@ @math {s } gives the suit.
660660
661+ @float Table
661662@multitable {Character} {Queen}
662663@headitem
663664Character
@@ -702,7 +703,9 @@ Character
702703@code {J }
703704 @tab King
704705@end multitable
705-
706+ @caption {Table 1: Rank (first) character of a card }
707+ @end float
708+ @float Table
706709@multitable {Character} {♦ Diamonds }
707710@headitem
708711Character
@@ -720,7 +723,8 @@ Character
720723@code {S }
721724 @tab ♠ Spades
722725@end multitable
723-
726+ @caption {Table 2: Suit (second) character of a card }
727+ @end float
724728The optional argument @math {h } indicates the id of the player's hand
725729being dealt. If it not present, that means the base hand. When
726730performing a splitting on the base hand, the original hand has id equal
@@ -949,39 +953,47 @@ decks = 1 # number of decks, negative means infinite
949953@item
950954@code {blackjack_pays } (sec.@ 4.1.1)
951955@item
952- @code {dealer } (sec.@ 4.1.2)
956+ @code {cards } (sec.@ 4.1.2)
957+ @item
958+ @code {cards_file } (sec.@ 4.1.3)
953959@item
954- @code {decks } (sec.@ 4.1.3 )
960+ @code {dealer } (sec.@ 4.1.4 )
955961@item
956- @code {flat_bet } (sec.@ 4.1.4 )
962+ @code {decks } (sec.@ 4.1.5 )
957963@item
958- @code {hands } (sec.@ 4.1.5 )
964+ @code {flat_bet } (sec.@ 4.1.6 )
959965@item
960- @code {maximum_bet } (sec.@ 4.1.6 )
966+ @code {hands } (sec.@ 4.1.7 )
961967@item
962- @code {max_incorrect_commands } (sec.@ 4.1.7 )
968+ @code {maximum_bet } (sec.@ 4.1.8 )
963969@item
964- @code {new_hand_reset_cards } (sec.@ 4.1.8 )
970+ @code {max_incorrect_commands } (sec.@ 4.1.9 )
965971@item
966- @code {no_insurance } (sec.@ 4.1.9 )
972+ @code {new_hand_reset_cards } (sec.@ 4.1.10 )
967973@item
968- @code {number_of_burnt_cards } (sec.@ 4.1.10 )
974+ @code {no_insurance } (sec.@ 4.1.11 )
969975@item
970- @code {penetration } (sec.@ 4.1.11 )
976+ @code {number_of_burnt_cards } (sec.@ 4.1.12 )
971977@item
972- @code {penetration_sigma } (sec.@ 4.1.12 )
978+ @code {penetration } (sec.@ 4.1.13 )
973979@item
974- @code {player } (sec.@ 4.1.13 )
980+ @code {penetration_sigma } (sec.@ 4.1.14 )
975981@item
976- @code {quit_when_arranged_cards_run_out } (sec.@ 4.1.14 )
982+ @code {player } (sec.@ 4.1.15 )
977983@item
978- @code {rules } (sec.@ 4.1.15 )
984+ @code {quit_when_arranged_cards_run_out } (sec.@ 4.1.16 )
979985@item
980- @code {shuffle_every_hand } (sec.@ 4.1.16)
986+ @code {rng_seed } (sec.@ 4.1.17)
987+ @item
988+ @code {rules } (sec.@ 4.1.18)
989+ @item
990+ @code {shuffle_every_hand } (sec.@ 4.1.19)
981991@end itemize
982992
983993@menu
984994* @code {blackjack_pays = } @math {r } ::
995+ * @code {cards = } @math {\text {list of cards }} ::
996+ * @code {cards_file = } @math {\text {path to file }} ::
985997 * @code {dealer = } @emph {game } ::
986998 * @code {decks = } @math {n } ::
987999 * @code {flat_bet = } @math {b } ::
@@ -995,6 +1007,7 @@ decks = 1 # number of decks, negative means infinite
9951007 * @code {penetration_sigma = } @math {r } ::
9961008 * @code {player = } @emph {player } ::
9971009 * @code {quit_when_arranged_cards_run_out = } @math {b } ::
1010+ * @code {rng_seed = } @math {n } ::
9981011 * @code {rules = [ ahc | enhc ] [ h17 | s17 ] [ das | ndas ] [ doa | do9 ] } ::
9991012 * @code {shuffle_every_hand = } @math {b } ::
10001013@end menu
@@ -1013,6 +1026,71 @@ blackjack_pays = 1.5
10131026blackjack_pays = 1.2
10141027@end verbatim
10151028
1029+ @node @code {cards = } @math {\text {list of cards }}
1030+ @subsection @code {cards = } @math {\text {list of cards }}
1031+ If this option is given, the dealer draws the cards specified on the
1032+ list. In the first hand, the order of the dealt cards
1033+
1034+ @enumerate
1035+ @item
1036+ Player's first card
1037+ @item
1038+ Dealer's first card
1039+ @item
1040+ Player's second card
1041+ @item
1042+ @dots {}
1043+ @end enumerate
1044+
1045+ where the ellipsis dots indicate continuation of the game
1046+ (i.e.@ dealer's hole card for @code {ahc } or player's hit card for
1047+ `enhc).
1048+
1049+ These cards will be the ones specified on the list in the prescribed
1050+ order. Each card is given by a two-character string, explained in
1051+ tbl.@ 1 and tbl.@ 2 respectively. Cards should be separated by spaces.
1052+
1053+ The dealer will continue drawing from the list of arranged cards until
1054+ either
1055+
1056+ @enumerate a
1057+ @item
1058+ there are no more cards in the list, in which case the dealer will
1059+ continue drawing cards from either i. a shoe with the already-dealt
1060+ cards removed, if @code {decks } is non-zero, or ii. a set of infinite
1061+ cards , if @code {decks } is zero.
1062+ @item
1063+ the hand is over and @code {new_hand_reset_cards } is @code {true }, or
1064+ @item
1065+ @code {quit_when_arranged_cards_run_out } is true, in which case the
1066+ program exits.
1067+ @end enumerate
1068+
1069+ @strong {Default } Empty list
1070+
1071+ @strong {Examples }
1072+
1073+ @verbatim
1074+ cards = TH JD 6C
1075+ cards = 2S 5D QS AC
1076+ cards = 8D QH TC 2C KD 7S 8S TD AH 5C
1077+ @end verbatim
1078+
1079+ @node @code {cards_file = } @math {\text {path to file }}
1080+ @subsection @code {cards_file = } @math {\text {path to file }}
1081+ This option is exactly the same as @code {cards } but the cards are given
1082+ in a text file instead of directly in the configuration file.
1083+
1084+ @strong {Default } No path
1085+
1086+ @strong {Examples }
1087+
1088+ @verbatim
1089+ cards_file = cards.txt
1090+ cards_file = ../arranged_cards.txt
1091+ cards = /var/games/cards.txt
1092+ @end verbatim
1093+
10161094@node @code {dealer = } @emph {game }
10171095@subsection @code {dealer = } @emph {game }
10181096Defines the game the dealer will deal. Currently, the only valid choice
@@ -1141,8 +1219,8 @@ reproducibility, it is easier to fix @code{rng_seed}.
11411219@strong {Examples }
11421220
11431221@verbatim
1144- quit_when_arranged_cards_run_out = false
1145- quit_when_arranged_cards_run_out = true
1222+ new_hand_reset_cards = false
1223+ new_hand_reset_cards = true
11461224@end verbatim
11471225
11481226@node @code {no_insurance = } @math {b }
@@ -1277,6 +1355,26 @@ quit_when_arranged_cards_run_out = false
12771355quit_when_arranged_cards_run_out = true
12781356@end verbatim
12791357
1358+ @node @code {rng_seed = } @math {n }
1359+ @subsection @code {rng_seed = } @math {n }
1360+ This option sets the seed of the random number generator used by the
1361+ dealer to draw cards. This is used to get deterministic results. That is
1362+ to say, the cards draw by two dealers using the same seed (and the same
1363+ number of decks) will be the same. It is not possible to guess what the
1364+ cards will be given a certain seed@ @math {n }. But the cards will be the
1365+ same for two executions of the program with the same seed@ @math {n }. If
1366+ this option is not set, the seed itself is as random as possible.
1367+
1368+ @strong {Default } Entropic non-deterministic random seed from C++'s
1369+ @code {std::random_device } (most likely @code {/dev/random }).
1370+
1371+ @strong {Examples }
1372+
1373+ @verbatim
1374+ rng_seed = 1
1375+ rng_seed = 123456
1376+ @end verbatim
1377+
12801378@node @code {rules = [ ahc | enhc ] [ h17 | s17 ] [ das | ndas ] [ doa | do9 ] }
12811379@subsection @code {rules = [ ahc | enhc ] [ h17 | s17 ] [ das | ndas ] [ doa | do9 ] }
12821380Defines the rules of the game.
0 commit comments