Question: Design a simple game that uses two dice ( each die with 6 sides, the common dice used in games ) . Rolling a die
Design a simple game that uses two dice each die with sides, the common dice used in games Rolling a die is of course going to require generating random numbers.
The players wins only when both dice take turns as they are rolled and result in matching numbers. Create two buttons and allow the players to click on each button alternatively. The user will not be allowed to click the same button more than two times at most. The user will be allowed to roll each dice as many times as needed, the best result is to see matching numbers ASAP. You can have two or more players and count how many times each player clicked before the winning result is achieved. The winner is the player that gets the matching numbers, with the least number of clicks.
Sample page: Page loads with both buttons, no results before user clicks.
Click either button to roll the dice.
Sample page: After user clicks the first button dice#
Sample page: After user clicks the second button dice#
Sample page: After the user clicks both buttons alternatively several times, as a result matching numbers appear.
Dice# Dice#
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
