Question: c++ Write a program to play the following game, which the user plays against the computer This game is played on an imaginary game board

c++

c++ Write a program to play the following game, which the user

Write a program to play the following game, which the user plays against the computer This game is played on an imaginary game board that has numbered spaces arranged in a circle.Forexample, here is what a game board with 12 spaces might look like. 0 10 When the program starts, the user is asked to specify how many spaces there are on the game board. There must be at least five spaces The computer then randomly selects two spaces (excluding space numbers 0 and 1): One of the selected spaces is The Goal. The other is The Pit. The computer announces the two special spaces. Play then starts from space # : Each player, in tu rolls a pair of dice and moves to another space by advancing N spaces where N S the n m er tha came up on te dice Forex pie using the sample game board with 12 spaces, if the user rolled a 10 (6 plus 4) on her first turn and a 7 (3 + 4} on her second turn, then she would land on space #5. That's where she would start on her next turn . The user and the computer take turns rolling the dice and moving around the board. Each move is displayed on the screen (as text, not graphics; e.g., "You are now on space #3"). The game continues until one playe lands on The Goal (and wins the game) or on The Pit (and loses the game) The computer announces the outcome of each game and keeps track of each player's wins and losses The user can choose single play (user must press for each roll of the dice) or continuous play (dice are automatically rolled and play continues until someone wins). .After each game the user can choose to quit or play another game

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 Databases Questions!