/Blackjack

Primary LanguageJavaScript

Blackjack

Blackjack is a User versus Dealer type of card game.

  1. The User receives 2 cards and those card values are shown.
  2. The Dealer receives 2 cards and only the second card value is shown.
  3. The User has two options: press a button to HIT or another button to STAND.
  4. If the User selects hit, the User receives a card from the deck.
    • If the User's sum is under 21 the User has the option to HIT or STAND again.
    • If the sum of the User's cards are over 21 the User is BUST and the Dealer wins.
  5. If the User picks STAND, the Dealer reveals both of their cards.
    • If the sum of the Dealer's cards are above or equal to the value of 17, the Dealer automatically STANDS.
    • If not, the Dealer HITS until at or above 17.
    • If the sum of the Dealer's cards are greater than 21 the Dealer is BUST and the User wins.
  6. If the sum of the User's cards are greater than that of the Dealer's cards without exceeding 21, the User wins.
  7. If the sum of the Dealer's cards are greater than that of the User's cards without exceeding 21, the Dealer wins.
  8. Game reveals winner to User.

Screenshot

The display of the game when the User first starts the game. Game Image

Technologies Used

  • Javascript
  • HTML
  • CSS
  • DevTools

Getting Started

Game Link

Next Steps

  • The ace will have an additional option to have the value 11.
  • The Win and lose outputs with additional css styling.