CRAPS(6) BSD CRAPS(6)
NAME
craps - the game of craps
SYNOPSIS
/usr/games/craps
DESCRIPTION
craps is a form of the game of craps that is played in Las Vegas. The
program simulates the roller, while you place bets. At any time, you may
choose to bet with the roller or with the House. A bet of a negative
amount is taken as a bet with the House; any other bet is a bet with the
roller.
At the start of the game, you have a "bankroll" of $2,000. The program
begins prompting with:
"bet?"
The bet can be all or part of your bankroll. Any bet over the total
bankroll is rejected and the program continues prompting until a proper
bet is made.
Once the bet is accepted, the roller throws the dice. The following rules
apply (you win or lose, depending on whether the bet is placed with the
roller or with the House; the odds are even). The first roll is the roll
immediately following a bet:
1. On the first roll:
7 or 11 -- wins for the roller;
2, 3, or 12 -- wins for the House;
any other number is the point, so roll again (Rule 2 applies)
2. On subsequent rolls:
point -- roller wins;
7 -- House wins;
any other number -- roll again.
If you lose your entire bankroll, the House offers to lend you an
additional $2,000. The program prompts as follows:
"marker?"
A yes (or y) consummates the loan. Any other reply terminates the game.
If you owe the House money, the House reminds you, before you can place a
bet, how many markers are outstanding.
If, at any time, you have outstanding markers and your bankroll exceeds
$2,000, the House asks:
"Repay marker?"
A reply of yes (or y) indicates your willingness to repay the loan. If
only 1 marker is outstanding, the debt is immediately repaid. However, if
more than 1 marker is outstanding, the House asks:
"How many?"
markers you want to repay. If you enter an invalid number or just a
carriage return, the program prints an appropriate message and prompts
with
"How many?"
until you provide a valid number.
If you accumulate 10 markers (a total of $20,000 borrowed from the
House), the program tells you and then exits.
Should your bankroll exceed $50,000, the House automatically deducts from
it the total amount of money needed to pay off all outstanding markers.
If you accumulate $100,000 or more, you break the bank. The program then
prompts:
"New game?"
to give the House a chance to win back its money.
The program usually considers any reply other than a yes to be a no.
Exceptions to this are when the program asks you if you want to place a
bet (i.e., bet?) and when it asks how many markers you want to pay off
(i.e., How many?).
To exit, send an interrupt (CTRL/I). Before exiting, the program tells
you whether you won, lost, or broke even.
MISCELLANEOUS
The random number generator for the die numbers uses the seconds from the
time of day. Depending on system usage, these numbers, at times, may
seem strange but occurrences of this type in a real dice situation are
not uncommon.