p4 - Blackjack EECS 280 Winter 2008 Out Friday March 7 Due...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 Blackjack! EECS 280 -- Winter 2008 Out: Friday, March 7, Due: Tuesday, March 25, 11:59 PM I. Introduction This project will give you experience implementing abstract data types, using interfaces (abstract base classes), and using interface/implementation inheritance. II. Blackjack (Simplified) Blackjack, also sometimes called 21, is a relatively simple game played with a standard deck of 52 playing cards. There are two principals, a dealer and a player. The player starts with a bankroll, and the game progresses in rounds called hands. At the start of each hand, the player decides how much to wager on this hand. It can be any amount between some minimum allowable wager and the player's total bankroll, inclusive. After the wager, the dealer deals a total of four cards: the first face-up to the player, the second face-up to himself, the third face-up to the player, the fourth face-down to himself. The player then examines their cards, forming a total. Each card 2-10 is worth its spot value worth 10. An ace is worth either 1 or 11--whichever is more advantageous to the player. If the total includes an ace counted as 11, the total is called "soft", otherwise it is called "hard". Play progresses first with the player, then the dealer. The player's goal is to build a hand that is as close to 21 as possible without going over---the latter is called a "bust", and a player who busts loses the hand without forcing the dealer to play. As long as the player believes another card will help, the player "hits"---asks the dealer for another card. Each of these additional cards is dealt face-up. This process ends either when the player decides to stand---ask for no cards---or the player busts. Note that a player can stand with two cards If the player is dealt an ace plus any ten or face card, the player's hand is called a "natural 21", and the player's wager is paid off with 3 to 2 odds, without examining the dealer's cards. In other words, if the player had wagered 10, the player would win 15 if dealt a natural 21 If the player neither busts nor is dealt a natural 21, play then progresses to the dealer. The dealer *must* hit until he either reaches a total greater than or equal to 17 (hard or soft), or busts. If the dealer busts, the player wins. Otherwise, the two totals are
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Sheet1 Page 2 compared. If the dealer's total is higher, the player's bankroll decreases by the amount of her wager. If the player's total is higher, her bankroll increases by the amount of her wager. If the totals are equal, the bankroll is unchanged The only case where the hands are equal that is not a push is when the player and dealer are each dealt natural 21s. In that case, the player is still paid 3:2. Note that this is a very simplified form of the game: we do not split
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 24

p4 - Blackjack EECS 280 Winter 2008 Out Friday March 7 Due...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online