bj
PURPOSE
Plays blackjack.
SYNOPSIS
/usr/games/bj
DESCRIPTION
The bj game plays the the role of the dealer in
blackjack. The following rules apply.
The bet is $2 every hand. If you draw a natural
(blackjack), you win $3. If the dealer draws a natural,
you lose $2. If you and the dealer both have naturals,
you exchange no money (a push). If the dealer has an ace
showing, you can make an insurance bet on the chance that
the dealer has a natural, winning $2 if the dealer has a
natural and lose $1 if not. If you are dealt two cards
of the same value, you can double, that is, play two
hands, each of which begins with one of these cards,
betting $2 on each hand. If the value of your original
hand is 10 or 11, you can double down, that is, double
the bet to $4 and receive exactly one more card in that
hand.
Under normal play, you can draw a card (hit) as long as
your cards total 21 or less. If the cards total more
than 21, you bust and the dealer wins the bet. When you
stand (decide not to hit), the dealer hits until he has a
total of 17 or more. If the dealer busts, you win. If
both you and the dealer stand, the one with the higher
total wins. A tie is a push.
The bj command deals, keeps score, and asks the following
questions at appropriate times: "?" (Do you want a hit?)
"Insurance?" "Double?" "Double down?". To answer
"yes," press" y"; to answer "no," press the Enter key.
The dealer tells you whenever the deck is being shuffled
and displays the action (total bet) and standing (total
won or lost). To quit the game, press INTERRUPT
(Alt-Pause); bj displays the final action and standing
and exits.