Question: Create the logic for a dice game. The application randomly throws five dice for the computer and five dice for the player. After each random
Create the logic for a dice game. The application randomly "throws" five dice for the computer and five dice for the player. After each random throw, store the results in an array. The application displays all the values, which can be from to inclusive for each die. Decide the winner based on the following hierarchy of die values. Any higher combination beats a lower one; for example, five of a kind beats four of a kind.
Five of a kind
Four of a kind
Three of a kind
A pair
For this game, the numeric dice values do not count. For example, if both players have three of a kind, it's a tie, no matter what the values of the three dice are. Additionally, the game does not recognize a full house three of a kind plus two of a kind
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
