A simple blackjack game without betting using only HTML/CSS/JS & jQuery
Live version currently running on GitHub Pages.
- This version of Blackjack is played with 6 decks and does not permit betting
- Aces count as 1 or 11 points (whichever is better), 2-9 count according to their value and 10s and face cards each count 10 points
- Each hand is valued as the sum of individual cards with the exception of a Blackjack (an ace and any 10-point card)
- An ace and any 10-point card is ranked higher than any other hands achieving 21 points
- The objective of the game is to win as many rounds as possible by beating the dealer
- A round is won by having a total hand value close or at 21 without exceeding 21 and beating the dealer's hand value
- Start a new round by pressing 'New round'
- The dealer reveals one card for himself and 2 for your hand
- You can choose one of two options:
- Hit: the dealer deals you an additional card to your hand, increasing your hand value. You may hit until you either choose to stand or exceed 21 in hand value, in which case you lose.
- Stand: you are no longer dealt additional cards and the dealer draws cards until he has at least 17 points or exceeds 21
- Once all the cards are dealt, the hand values are scored and the winner is determined
- You win if:
- Your hand value does not exceed 21 and your dealer's hand value exceeds 21
- Your hand value does not exceed 21 and your hand value is higher than the dealer's
The easiest way to run the game locally is to use the NPM package http-server
:
# Clone the code
cd ~/projects
git clone https://github.com/felixweinberger/blackjack-js
cd blackjack-js
# Install http-server
npm install -g http-server
# Run the server with caching disabled (for easier development)
http-server -c-1
When the server is up and running, point your browser to localhost:8080
to play the game.