Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are going to program a 2-player dice game.JAVA code The rules of the game are: Each player rolls two dice They compare the highest

You are going to program a 2-player dice game.JAVA code

The rules of the game are: Each player rolls two dice They compare the highest number each roll. The player whose number is greater earns 2 points. They compare the lowest number each roll. The player whose number is greater earns 1 point. If the numbers are a tie, no points are awarded. The first player to 20 total points wins. Example 1: Player 1 rolls a six and a three. Player 2 rolls a four and a three. Player 1 is awarded 2 points (six is higher than four). No points for the tie (three and three). Example 2: Player 1 rolls a five and a two. Player 2 rolls a six and a one. Player 2 is awarded 2 points (six is higher than five) and Player 1 is awarded 1 point (two is higher than one). Your program name will include: Your last name and the word Final in its name Be well documented Give the user the option to run again Provide clear instructions The user will control the roll of the dice Contain 3 methods Show the results of each roll, the result of the turn and the current score Correctly implement the rules of the game?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Usability

Authors: Jakob Nielsen, Raluca Budiu

1st Edition

0133122131, 9780133122138

More Books

Students also viewed these Programming questions