Question: Java Program 6 Specification: Write a program that allows a single Player ( the user ) to play a simple three dice game of chance

Java Program6 Specification:
Write a program that allows a single Player (the user) to play a simple three dice game of chance against "The Odds".
Game Description:
There is a single player, with four (four sided) dice
The sides of each die are labeled with the numbers from 1 to 4, the number on the side facing down will used as the value of the die.
A game is made up of rounds, a single round is played as such:
The player rolls their four dice:
d1=(int)(Math.random()*4)+1;
d2=(int)(Math.random()*4)+1 ;
d3=(int)(Math.random()*4)+1 ;
d4=(int)(Math.random()*4)+1;
d1, d2, d3, d4 declared as type int before the game loop.
The dice are displayed, in some reasonable format.
A determination is made as to whether or not the player has won the round. The player loses the round unless they have one of the following:
A Quad: all the dice have the same number on their bottom faces.
A Triple all but one of the dice have the same number on their bottom faces.
A TwoPair: any two dice have the same number on their bottom faces n1, and both of the remaining two dice also have the same number on their bottom faces n2, and n1 is not equal to n2
A HighPair: exactly two dice have the number 4 on their bottom faces
The result of the round (Quad, Triple, Two Pair, High Pair, Loss) is reported.
The player is asked if they wish to play another round.
Once the player indicates that they do not wish to play another round: Before exiting, the program displays a short report stating how many rounds were played, of those - how many were won and how many were lost.
Grading:
\table[[Performance Indicator,1,2,3
Java Program 6 Specification: Write a program

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 Programming Questions!