Visit www.myprogramminglab.com to complete this Programming Challenge online and get instant feedback.
First to One Game
This game is meant for two or more players. In the game, each player starts out with 50 points, as each player takes a turn rolling the dice; the amount generated by the dice is subtracted from the player’s points. The first player with exactly one point remaining wins. If a player’s remaining points minus the amount generated by the dice results in a value less than one, then the amount should be added to the player’s points. (As an alternative, the game can be played with a set number turns. In this case, the player with the amount of points closest to one, when all rounds have been played, wins.)
Write a program that simulates the game being played by two players. Use the Die class that was presented to simulate the dice. Write a Player class to simulate the players.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here