This game is meant for two or more players. In the game, each player starts out with
Question:
This game is meant for two or more players. In the game, each player starts out with 30 points, as each player takes a turn rolling the dice; the amount generated by the dice is subtracted from the player’s points. Either the first player with exactly one point, or the player with the lowest number of points after 10 rounds wins, whichever comes first. If a player’s remaining points minus the amount generated by the dice results in a value less than 1, the value of the dice is added to the player’s points.
Write a program that simulates the game being played by two players. Use the Die class that was presented in Chapter 6 (a copy is attached) to simulate the dice. Write a Player class to simulate the players. Your program should notify each player of their turn, activate their roll when the player enters a key and display the roll of the dice and the player’s current net points. At the end of the game, display a message to congratulate the winner and show each player’s points.
Your program should allow the user to control the flow of the game by allowing them to enter a key to activate the roll.
Create and save the program that demonstrates the class. Two programs are needed (Player class and Demo class)
Principles of Information Security
ISBN: 978-1285448367
4th Edition
Authors: Michael E. Whitman, Herbert J. Mattord