Blackjack
Loading...
Searching...
No Matches

A simplified version of Blackjack.
Rules:

  • There are two kinds of Player: Dealer and User
  • The dealer gets one card to start (in real life, the dealer gets two, but one is face down so it doesn’t matter at this point).
  • Users gets two cards to start.
  • Dealer goes last.
  • A player can repeatedly “hit” or “stand”.
  • If the player “stands”, their turn is over, and their score is calculated based on the cards they have been dealt.
  • If the player “hits”, they get another card and the value of that card is added to their total score.
  • An ace normally counts as a 1 or an 11 (whichever is better for the total score).
  • If a player goes over a score of 21, they bust and lose immediately.
  • The dealer repeatedly draws until they reach a score of 17 or more, at which point they stand.
  • Otherwise, the player with the highest score wins.

    • We don't consider ties for simplicity.
    • So, it can happen that both multiple players can win.

    In our simplified version of Blackjack, we’re not going to keep track of which specific cards a player has been dealt. We’ll only track the sum of the values of the cards.