Code answering/ Computer Science

Posted on Posted in Computer Science

Properly using your PairOfDice class, write a Java program (a driver with a main function), called DiceGame.java, that allows the user to play the a game with the computer. Here are the rules of the game: A player rolls the dice repeatedly until she rolls at least one 1 or voluntarily gives up the dice. Each time she rolls the dice the total on the faces of the dice is added to her score, except when she rolls a 1. If she rolls one 1, she loses all the points she’s accumulated so far in her turn. If she rolls two 1’s, she loses all of her points so far in the game. (This means you have to keep track of points in each turn and points since the beginning of the game). The first player to get a total of 100 wins. The computer follows the same rules, except that it turns over the dice as soon as its score for the current turn is at least 20.

Looking for the best essay writer? Click below to have a customized paper written as per your requirements.