A pure javascript game. 21 is a blackjack game, where the player has to get as close as possible to 21 without going over. The game is played against the computer, and the player can choose to get more cards or stand. The game is over when the player decides to stand or when the player goes over 21.
You must get 21 to win (well, that's a bit obvious).
Every new game, you will receive 2 cards
and Dealer(AI) 2 cards
as well but one upside down
. When you press the get card
button, you'll get yourself another card. Be careful and do not go over 21, if you feel you are not going to get to 21. You can play safe and stop, with the stop button
.
- J, Q and K have a value of 10, all other cards are worth what they say, except one (Ace).
- Ace has two possible values, 11 or 1. The value can change in your favor, more than once.
Don't worry about the Ace worth, the game will get the best worth for you.
These blackjack rules may be different from others, I have tried to keep them simple, because simple is best. Have fun :
This game was developed using this technologies:
All the logic of the game is in the assets/js/game.js
file, and the game is rendered in the index.html
file using its min version game.min.js
.
This game also uses underscore.js
for some logic, and bootstrap
for the styles.
You can found about the game logic in the
assets/js/game.js
file.
This project is under the License (MIT) - see the file LICENSE.md for details.