Blackjack-Game

image

Players are each dealt two cards, individually facing up or down depending on the casino and the table. In the U.S., the dealer is also dealt two cards, normally one up (exposed) and one down (hidden). The value of cards two through ten is their pip value (2 through 10). Face cards (Jack, Queen, and King) are all worth ten. Aces can be worth one or eleven. Goal of the game is to add up your cards to the largest number without going over 21. If the cards in your hand add up two more than 21, the its's called a BUST. It means that you LOSE. That depending on whether if you've gone over 21 or whether if you're under 21, you can decide which value you want your Ace to represent. A hand's value is the sum of the card values. Players are allowed to draw additional cards to improve their hands. A hand with an ace valued as 11 is called "soft", meaning that the hand will be guaranteed to not score more than 21 by taking an additional card. The value of the ace will become one to prevent the hand from exceeding 21. Otherwise, the hand is called "hard".

Once all the players have completed their hands, it is the dealer's turn. The dealer hand will not be completed if all players have either exceeded the total of 21 or received blackjacks. The dealer then reveals the hidden card and must draw cards, one by one, until the cards total up to 17 points. At 17 points or higher the dealer must stop. (At most tables the dealer also hits on a "soft" 17, i.e. a hand containing an ace and one or more other cards totaling six.) Players bet on the basis that they will individually have better hands than the dealer. The better hand is the hand where the sum of the card values is closer to 21 without exceeding 21. The detailed outcome of the hand follows:

Our Blackjack Game Rules

  • The deck is unlimited in size.
  • There are no jokers.
  • The Jack/Queen/King all count as 10.
  • The the Ace can count as 11 or 1.
  • Use the following list as the deck of cards:
  • cards = [11, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10]
  • The cards in the list have equal probability of being drawn.
  • Cards are not removed from the deck as they are drawn.
  • The computer is the dealer.

Wikipedia was used to explain the game. (https://en.wikipedia.org/wiki/Blackjack)