Answered step by step
Verified Expert Solution
Link Copied!

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 2 dice until either a 1 is rolled or the player decides to "hold" following these rules:
If a single 1 is rolled, the player scores nothing and it is the next persons turn.
If neither dice shows a 1, 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 1s 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 100 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 1 or Player 2). It must contain 2 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke, David Auer

11th Edition

B003Y7CIBU, 978-0132302678

More Books

Students also viewed these Databases questions

Question

What are the advantages and disadvantages of prototyping?

Answered: 1 week ago