Skip to content

Commit b569856

Browse files
committed
doc
1 parent 320bbc9 commit b569856

2 files changed

Lines changed: 31 additions & 2 deletions

File tree

src/blackjack.cpp

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,36 @@ Blackjack::Blackjack(Configuration &conf) : Dealer(conf), rng(dev_random()), fif
214214
///conf+new_hand_reset_cards+details and different hitting/standing strategies to compare outcomes.
215215
///conf+new_hand_reset_cards+details If the actual dealt cards are not important but only reproducibility, it is easier to fix `rng_seed`.
216216
///conf+new_hand_reset_cards+default `true`
217-
///conf+new_hand_reset_cards+example quit_when_arranged_cards_run_out = false
218-
///conf+new_hand_reset_cards+example quit_when_arranged_cards_run_out = true
217+
///conf+new_hand_reset_cards+example new_hand_reset_cards = false
218+
///conf+new_hand_reset_cards+example new_hand_reset_cards = true
219219
conf.set(&new_hand_reset_cards, {"new_hand_reset_cards"});
220220

221221
// read arranged cards
222+
///conf+cards+usage `cards = ` $\text{list of cards}
223+
///conf+cards+details If this option is given, the dealer draws the cards specified on the list.
224+
///conf+cards+details In the first hand, the order of the dealt cards
225+
///conf+cards+details @
226+
///conf+cards+details 1. Player’s first card
227+
///conf+cards+details 2. Dealer’s first card
228+
///conf+cards+details 3. Player’s second card
229+
///conf+cards+details 4. ...
230+
///conf+cards+details @
231+
///conf+cards+details where the ellipsis dots indicate continuation of the game (i.e. dealer's hole card for `ahc` or player’s hit card for `enhc).
232+
///conf+cards+details @
233+
///conf+cards+details These cards will be the ones specified on the list in the prescribed order.
234+
///conf+cards+details Each card is given by a two-character string, explained in @tbl:rank and @tbl:suit respectively.
235+
///conf+cards+details Cards should be separated by spaces.
236+
///conf+cards+details @
237+
///conf+cards+details The dealer will continue drawing from the list of arranged cards until either
238+
///conf+cards+details @
239+
///conf+cards+details a. there are no more cards in the list, in which case the dealer will continue drawing cards from either
240+
///conf+cards+details i. a shoe with the already-dealt cards removed, if `decks` is non-zero, or
241+
///conf+cards+details ii. a set of infinite cards , if `decks` is zero.
242+
///conf+cards+details b. the hand is over and `new_hand_reset_cards` is `true`, or
243+
///conf+cards+details c. `quit_when_arranged_cards_run_out` is true, in which case the program exits.
244+
///conf+cards+default Empty list
245+
///conf+cards+example cards = TH JD 6C
246+
///conf+cards+example cards = 2S 5D QS Ac
222247
if (conf.exists("cards")) {
223248
if (conf.exists("cards_file")) {
224249
std::cerr << "error: cannot have both cards and cards_file" << std::endl;

src/players/stdinout.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,17 @@ void StdInOut::info(lbj::Info msg, int p1, int p2) {
130130
///inf+card_player+details | `Q` | Queen |
131131
///inf+card_player+details | `J` | King |
132132
///inf+card_player+details @
133+
///inf+card_player+details : #tbl:rank Valid rank (first) character
134+
133135
///inf+card_player+details | Character | Suit |
134136
///inf+card_player+details |:---------:|------------------|
135137
///inf+card_player+details | `C` | ♣ Clubs |
136138
///inf+card_player+details | `D` | ♦ Diamonds |
137139
///inf+card_player+details | `H` | ♥ Hearts |
138140
///inf+card_player+details | `S` | ♠ Spades |
139141
///inf+card_player+details @
142+
///inf+card_player+details : #tbl:suit Valid suit (second) character
143+
///inf+card_player+details @
140144
///inf+card_player+details The optional argument $h$ indicates the id of the player's hand
141145
///inf+card_player+details being dealt. If it not present, that means the base hand.
142146
///inf+card_player+details When performing a splitting on the base hand, the original hand

0 commit comments

Comments
 (0)