Question: C++ Programming. 2 dice Pig. Create a program that makes a user play against the computer a game of Pig with 2 dice (Not one).

C++ Programming.

2 dice Pig.

Create a program that makes a user play against the computer a game of Pig with 2 dice (Not one).

Make the program follow these rules:

The player should take turns playing against the computer. Values from 2-6 are added together and go to the total score for the current round. The player will have the option of: Saving and pass- adding all the points to the total MAIN score and passing the next turn to the computer. Rolling - having the option of rolling both dice again. If the values are 2-6 again, the player can have another turn or decide to save and pass again. If either player rolls a 1 the following rules aply: If only one die has value 1 and the other doesnt, then the current round score (not the main total score) is cleared. If both dice have 1s, the total main score is cleared and reset to 0. The starting player should be chosen at random. Create a way to stop the computer from taking unlimited turns until a 1 is hit. You can set a limit of turns the computer can take before deciding to Save and Pass. Otherwise, the game won't be fair since no score will be updated for the computer. How you approach this problem is at your own discretion. First player to hit 120 points wins.

To receive full credit you must follow all rules.

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!