Question: HTML javascript assignment, need answer asap In this assignment, you will be required to use JavaScript to complete a simple card game called War. War
HTML javascript assignment, need answer asap
In this assignment, you will be required to use JavaScript to complete a simple card game called War. War is a simple card game. In this game each player is dealt 1 card, the player with the highest card value wins the round. The game continues until there are no more cards to be dealt. The player who wins the most rounds at the end of the game is declared the winner. Rules of the game: There are 2 types of participants in this game of War, the dealer and the player. The game starts with each player receiving 1 card. If at any point, the players card value equals the dealers card value, each participant is dealt 1 extra card until he/she receives 3 extra cards, the last of these 3 cards is used to determine the winner of the round. If there are not enough cards available, cards are dealt until the last card of the deck dealt. Card Values: Ace: 1 King: 10 Queen: 10 Jack: 10 All other cards have face values (i.e. 8 is worth 8, etc.) Assignment: The following specifications are required for successfully completing this assignment: 1. When the game starts, both the dealer and the player are dealt 1 random card a. Duplicate cards are not permitted in a game 2. The scores of each participants must be updated in the dealerScore and playerScore headings at the end of each round 3. The Next Round button must allow the player and dealer to draw for then next round a. When going from one round to the next, cards from the previous round are remove from the page 4. When all cards are dealt and the last rounds score is registered, the scores are compared a. The winner is identified by adding the statement has won the hand to the current identification of the winning participant b. The winners identification should also be highlighted in green 5. When the End Game Menu item is clicked, the Next Round is disabled and would no longer have its previous functionality.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
