/Python-Blackjack

A Python program simulating the popular card game of Blackjack.

Primary LanguagePython

Blackjack is Back!

This program is designed to simulate one of the most popular card games to play, Blackjack. Its rules are simple, the play is thrilling, and there is definately room for strategy, even if you might only be playing against yourself.

Object of the Game

The player must beat the dealer by getting their count as close to 21 as possible, without going over 21.

  • Card Values/Scoring It is up to each individual player if an ace is worth 1 or 11. Face cards are 10 and any other card is its pip value.

  • Betting Before the deal begins, the player places a bet in chips -and no you can't eat them- in front of him on the "table". With my program, you can only bet up to $100.

  • The Shuffle and Cut The dealer shuffles portions of the deck and then designates one of the players to cut.

  • The Deal When the player has placed his bet, the dealer gives one card face up to the player, and then one card face up to himself. Another round of cards is then dealt face up to the player, but the dealer takes his second card face down.

  • Naturals If a player's first two cards are an ace and a "ten-card" (a picture card or 10), giving him a count of 21 in two cards, this is a natural or "blackjack."

  • The Play The player to the left goes first and must decide whether to "stand" (not ask for another card) or "hit" (ask for another card in an attempt to get closer to a count of 21, or even hit 21 exactly). Thus, a player may stand on the two cards originally dealt him, or he may ask the dealer for additional cards, one at a time, until he either decides to stand on the total (if it is 21 or under), or goes "bust" (if it is over 21). In the latter case, the player loses and the dealer collects the bet wagered.

  • The Dealer's Play When the dealer has served, his face-down card is turned up. If the total is 17 or more, he must stand. If the total is 16 or under, he must take a card. He must continue to take cards until the total is 17 or more, at which point the dealer must stand. If the dealer has an ace, and counting it as 11 would bring his total to 17 or more (but not over 21), he must count the ace as 11 and stand.

  • Doubling Down Another option open to the player is doubling his bet when the original two cards dealt total 9, 10, or 11. When the player's turn comes, he places a bet equal to the original bet, and the dealer gives him just one card, which is placed face down and is not turned up until the bets are settled at the end of the hand. With two fives, the player may split a pair, double down, or just play the hand in the regular way. Note that the dealer does not have the option of splitting or doubling down.

Order of the Cards