Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In c + + windows language Pig Game Rules Pig is a jeopardy approach dice game. This game gives the player an opportunity to jeopardize
In c windows language
Pig Game Rules
Pig is a jeopardy approach dice game. This game gives the player an opportunity to jeopardize previous gains by rolling for potential greater gains, with the goal to closely approach a goal score without exceeding it
There are Two Players. During each players turn, the player repeatedly rolls dice until either a is rolled or the player decides to "hold" following these rules:
If a single is rolled, the player scores nothing and it is the next persons turn.
If neither dice shows a the dice sum is added to the players score to the turn total
If a player chooses to "hold", their turn total is added to their score, and it becomes the next player's turn.
If two s are rolled, the players entire score is lost, and the turn ends.
If a double is rolled, the point total is added to the turn total as with any roll but the player is obligated to roll again
The player whose score is closest to the goal score wins.
The first player to score or more points wins.
Problem Statement:
Your new job at UDGameworx has put you on the Pig Game App for Windows Computers. Your program must follow the rules set in Pig Game Rules section. Your window must let the user know whos turn it is player or Player It must contain buttons Hold or Roll and tell the users whos turn it is It should display the running total for each player and the running total for the given players turn score and results of the given roll. Your program must declare a winner when one was found. Dice must use a seeded random number generator.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started