p4 - Blackjack EECS 280 Winter 2009 Out Thursday March 12th...

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

View Full Document Right Arrow Icon
Blackjack! EECS 280 -- Winter 2009 Out: Thursday, March 12th Due: Tuesday, March 31st, 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; each face card (jack, king, queen) is also 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; one need not hit at all in a hand. 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 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; this is called a "push". 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.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Note that this is a very simplified form of the game: we do not split pairs, allow double-down bets, or take insurance. Likewise, a natural 21 for the dealer does not end the hand pre-emptively. III.
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.

This note was uploaded on 01/28/2010 for the course EECS 280 taught by Professor Noble during the Spring '08 term at University of Michigan.

Page1 / 11

p4 - Blackjack EECS 280 Winter 2009 Out Thursday March 12th...

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