/web-based-blackjack

A simple web-based blackjack game as an introduction to web development

Primary LanguageJavaScript

CS372_Project_3

Informal Notes

  1. Background music will autoplay in Edge but will not in Chrome or Mozilla.
  2. CSS style incomplete.

Basic Blackjack Rules:

The goal of blackjack is to beat the dealer's hand without going over 21.
Face cards are worth 10. Aces are worth 1 or 11, whichever makes a better hand.
Each player starts with two cards, one of the dealer's cards is hidden until the end.
To 'Hit' is to ask for another card. To 'Stand' is to hold your total and end your turn.
If you go over 21 you bust, and the dealer wins regardless of the dealer's hand.
If you are dealt 21 from the start (Ace & 10), you got a blackjack.
Blackjack usually means you win 1.5 the amount of your bet. Depends on the casino.
Dealer will hit until his/her cards total 17 or higher. 

Doubling is like a hit, only the bet is doubled and you only get one more card.
Split can be done when you have two of the same card - the pair is split into two hands.
Splitting also doubles the bet, because each new hand is worth the original bet.
You can only double/split on the first move, or first move of a hand created by a split.
You cannot play on two aces after they are split.
You can double on a hand resulting from a split, tripling or quadrupling your bet.