Stage 1
To begin, display the jackpot to the screen and prompt for and read the player’s choice. Display the player’s choice to
the screen as seen below.
Sample output 1:
Jackpot: 100
Steal, Deal or Quit [s|d|q]? s
You chose: Steal
Stage 2
Add code to generate the computer's choice.
Use the rand() function to simulate the computer’s choice (i.e. 1 + (rand() % 2) where 1 represents the
computer choosing steal and 2 represents the computer choosing deal). Display the computer's choice to the screen
as seen below.
Sample output 1:
Jackpot: 100
Steal, Deal or Quit [s|d|q]? s
You chose: Steal
Comp chose: Steal
Stage 3
Add code to determine whether the player wins, loses or draws with the computer. Display the appropriate message
to the screen according to the following rules of play:
If both players (computer and human) choose to make a deal to share the jackpot, the jackpot is split equally
between both players and they both receive half the money. i.e. $50 each. The following message is
displayed to the screen: Draw! Split pot – 50 each!
If the human player chooses steal the jackpot and the computer player chooses to make a deal to share the
jackpot, the human player receives all the money and the computer player who chose to make a deal receives
none. The following message is displayed to the screen: You win! You gain 100.
If the computer player chooses steal the jackpot and the human player chooses to make a deal to share the
jackpot, the computer player receives all the money and the human player who chose to make a deal receives
none. The following message is displayed to the screen: You lose! Comp gains 100.
If both players (computer and human) choose to steal the jackpot, they both receive nothing. The following
message is displayed to the screen: Too greedy! You get nothing!
Display the appropriate message to the screen as seen below:
Sample output 1:
Jackpot: 100
Steal, Deal or Quit [s|d|q]? s
You chose: Steal
Comp chose: Steal
Too greedy! You get nothing!
Stage 4
Now… it’s time to allow the player to play more than one game. Let’s add a loop which loops until the user either
enters 'q' (to quit the game) or the 10 game limit is reached. Think about where this code should go – what needs to
be repeated, etc.
the whole question will be posted tonight then along with the sample outputs any help would be appreciated
but basically our task is to make a steal or deal game where the user types s d or q the s is steal d is deal and q is quit then as shown above for the rules then we have to repeat this 10 times then show a culminative total when they have reached 10 turns or have chosen to quit