Question: OverviewFor this assignment, write a C program to play an automated dice game that uses two dice ( GVDie classprovided ) . The player rolls

OverviewFor this assignment, write a C program to play an automated dice game that uses two dice (GVDie classprovided). The player rolls both dice and either wins one credit, loses one credit, or sets a goal for futurerolls. The current round ends when player wins or loses a credit. The game ends when credits are zero. Read the provided starter template and do not change the provided code. Two GVDie objects arecreated. The GVDie class includes Roll() and GetValue() functions. Ask the user to input a positive integer. Scan in this integer and use it as a random seed is read toinitialize a sequence of random numbers. This supports automated testing and creates predictableresults that would otherwise be random. Ask the user to input a positive integer representing the initial number of credits. Read in the usersinput. Roll both dice. Rolling 7 or 11 wins one credit. Rolling 2,3, or 12 loses a credit. If no credits are won or lost (rolling a 4,5,6,8,9 or 10), credits do not change and the playersgoal is set to the dice total. If player did not win or lose in step 1(i.e. a goal was set), continue rolling both dice until one oftwo outcomes: 1) player rolls a 7 and loses one credit or 2) player rolls the goal value and wins onecredit. A this point, the current round ends. Set goal to -1 and output credits. Add a loop to repeat this process until available credits are zero. Count and output the number ofrounds when game is over. Output dice total and credits at each roll. Sum and output the number of rounds when the game is finished. Your output should match the sample run below.
OverviewFor this assignment, write a C program to

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