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 a pair of 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 in Chapter 4 to simulate the dice. Write a Player class to simulate the players.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.