Question: Develop a Java application that simulates a 2 player dice game. The game is played with two dice that can have different number of sides.
Develop a Java application that simulates a 2 player dice game. The game is played with two dice that can have different number of sides. The player provides their name and the desired number of die sides as the input. The program will roll two dice for the casino and two dice for the player and displays the result.
The program must have 2 classes.
Output example below:
Enter your name: Anna --------------------------------- What dice would you like to play with? Enter 3 for 3-sided dice. Enter 4 for 4-sided dice. Enter 6 for 6-sided dice. Enter 8 for 8-sided dice. Enter 10 for 10-sided dice. Enter 12 for 12-sided dice. 10 --------------------------------- *************************************************************** Casino's score: 13 Anna's score: 12 ***************************************************************
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
