Question: Using javascript and external file js and css - Create a page that allows the user to play a game with the computer. In this
Using javascript and external file js and css Create a page that allows the user to play a game with the computer. In this game, the player will roll two dice and the computer will roll two dice. The Math.random method will be used to generate each
roll of a die, from to The sum of the computer's roll should be compared to the sum of the player's roll and whoever has the greater sum is the winner of that round. The sum of the winner's roll for that
round should be added to his or her point total. Use functions to call for each roll of two dice and the sum, for keeping track of the points, and to allow the player to continue or quit after a round of play. The
following are the game rules:
If one player rolls doubles ie two fours or two sixes, etc. and is a winner for that round, he or she should get double points.
If one player rolls doubles but is not a winner, nothing special happens.
If the two sums for any round are a tie, no one gets any points.
The game ends when either player reaches at least points or when the human player wants to quit.
Save your page as dice. and be sure to include an appropriate page title.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
