Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Language is JAVA Task 1 This game requires two 6-sided dice. You will need to simulate these dice with a random number generator. The two

image text in transcribedimage text in transcribed

Language is JAVA

Task 1 This game requires two 6-sided dice. You will need to simulate these dice with a random number generator. The two dice (random number generators) must: Produce values between 1-6 Have a seed of 140L and 340L, respectively for die one and die two (for testing purposes) Task 2 Now that you have your dice, we can go over the rules you will be playing by. Rules: For each turn, the players will take turns rolling the two dice. . If a 1 doesn't appear on either dice, the values are added to the player's total. They then have the choice to roll again (choice 0) or pass the turn to the other player(choice 1). If a 1 appears on one of the dice, the player gets no points added to their total for that entire turn and it becomes the other players turn to roll (points earned on previous turns will still be present in their totals). If a player rolls both 1s, the player's turn is over and their total is reset to O You will need one more random number generator that will determine if the computer(O) or player(1) will go first. This will also be used to simulate the computers choice to either roll again or pass the turn over. The seed for this generator will be 140L Assume valid input from the user. Output should begin with the statement "Welcome of the Game of Pigs" All following user prompts should look similar to: Your turn (current points: 0) You rolled 3 and 2, points earned this turn:5 Press 0 to roll again or 1 to start computer's turn And all computer prompts should look like: Computer's turn (current points: 0) Computer rolled 1 and 4, no points earned and your turn

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

Students also viewed these Databases questions

Question

List and explain the key steps involved in text analytics.

Answered: 1 week ago

Question

=+ What would it look like? Who should deliver it?

Answered: 1 week ago