You are coding a simple game called Pig in C++. The rules are as follows: Two pl
ID: 3766532 • Letter: Y
Question
You are coding a simple game called Pig in C++. The rules are as follows:
Two players (you and the computer) are racing to reach 100 points.
• Each turn, the active player faces a decision: – Hold: take your turn total and add it to the player's overall total. The next player becomes active. – Roll: generate a random number between 1 and 6. Results are: * ’1’ Lose turn, no turn total added to overall total. All the points you have accumulated this turn are lost. * ’2’..’6’ Add this number to the turn total. Player goes again. • I suggest you keep the computer AI as simple as possible.