BLACKJACK DO not use jquery strictly java script Black Jack is a simple card game that is also often called 21. The point of the game is to get a value as close to 21 without going over. A player that obtains the score of 21 with only 2 cards is said to have a Black Jack.
BLACKJACK
DO not use jquery strictly java script
Black Jack is a simple card game that is also often called 21. The point of the game is to get a value as close to 21 without going over. A player that obtains the score of 21 with only 2 cards is said to have a Black Jack.
Rules of the game:
There are 2 types of participants in a game of Black Jack, the dealer and the players. The players play against the dealer and not against each other. In order to win, the player must have a hand value superior to that of the dealer’s.
The game starts with each player receiving 2 cards, the dealer receiving 2 cards. Each player has the option to add an additional cards (1 by 1) to his hand (Draw) or to stay with the cards he currently has (Hold). If at any point, the player’s total exceeds 21, he automatically loses the hand (Bust).
When all players complete this process, the dealer gets to complete his hand. As long as the dealer’s point total is 16 or less, he must draw a new card. As soon as the dealer’s hand reaches the value of 17 or more, he must remain with the current hand. If the dealer’s hand exceeds 21, the players still participating in the hand (those that did not Bust) automatically win.
Assignment:
This game will be a simplified version of the traditional game:
- Only 1 player and a dealer
- Aces count as the value 11 at all times
The following specifications are required for successfully completing this assignment:
- When the document loads, both the dealer and the player must have 2 random cards
- Duplicate cards in a single hand are not permitted
- Each hand starts with a blank slate, no data passes from 1 hand to the next
- The scores of each participants must be updated in the “dealerScore” and “playerScore” sections
- The “Draw 1 more Card” button must allow the player to draw an additional card
- If the player’s score is currently at 21 or higher, this button must become disabled
- The hold button must also become disabled
- The “Hold” button concludes the player’s actions and triggers the completion of the dealer’s hand as per the rules of the game.
- This button must become disabled
- The “Draw 1 more Card” button must also become disabled
- The hand ends at the conclusion of the dealer’s turn
- The scores are compared
- The winner is identified by adding the statement “has won the hand” to the current identification of the winning participant
- The winner’s identification should also be highlighted in green
- If the player’s score is currently at 21 or higher, this button must become disabled
The images are the html code that was used, so you can implement the javascript code
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images