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 1 to 6. 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 (i.e., 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 100 points or when the human player wants to quit.
Save your page as dice. ntm1 and be sure to include an appropriate page title.
Using javascript and external file js and css -

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!