Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Notes: Lessthan0lifemeanslose. Most life remaining wins a point if both players have more than 0 life. A draw if life total is the same. First

image text in transcribed

Notes:

Lessthan0lifemeanslose.

Most life remaining wins a point if both players have more than 0 life. A draw if life total is the same.

First to 2 points win.

Can change dice distribution each round.

Make both the two-player version of game as well as a dummy AI which randomly distributes dice each

round.

Example Round:

Mark and Susie decide to play a rousing game of DiceBattleSimulator. They each have seven dice. Mark wants to play defensively and chooses to put 5 dice on life and 2 dice on normal attack. Susie decides to go big, so she puts 1 dice into speed, 2 dice into life, and 4 dice into big attack. They both roll their dice.

We check speed dice first. Mark has 0, and Susie rolls a 2. This means Susie attacks first. She her life dice has 1 success so she has 4 (3+1) total life now. She is a sad panda because she only rolled 1 successful big attack and will deal 5 total damage. Mark ends up with 3 successes on life, and has 10 life. He only rolls 1 success on attack, so he would deal 3 damage.

The result is Susie dealing 5 damage to Mark, putting him down to 5 life. Since Mark still has life left, he deals his 3 damage to Susie. Since Susie is using a big attack, she takes double damage and takes 6 instead. This puts her at -2 life, and she loses the round. Mark gets 1 point, two more points to go!

Requirements for submission:

Submit ONLY .java files COMPILING CODE A screen shot of you winning Do not write the entire program in a single main method. The main method should contain minimal code.

Extra credit is awarded through good programming style, techniques, and additional work. If you want to go above and beyond for massive extra credit, document your extra efforts and extra credit will be evaluated on a case by case basis.

Dice Battle Simulator Dice games are some of the most common games that exist. I've made an arbitrary rule set of a dice game that I would like you to program using what we've learned so far about numbers, if else's, and class building. Additionally, this lab is budgeted for two weeks and will go into chapter 6, loops. You'll need those as well. The rules of the game are as follows: Both players are given seven, six-sided" dice (you can make this value configurable if you like, both dice count and number of sides on the dice). The players distribute the dice among four categories. Speed, life, attack, big attack. Once you've locked in where the dice go, you roll your dice and see the outcome. For each success, which is a 4 or better (you can make this value configurable), you get the associated effect for the given field. The faster player attacks first and checks if they've put the opponent below 0 life If so they win a point, otherwise opponent gets to attack back. Play until a player gets three points and wins (you can make this value configurable if you'd like). 1. 2. 3. 4. 5. In addition to making the game work, I'm looking for you to write as many classes as you need, write as many methods that you can (especially on reusable code), write constructors as needed, write a tester class, etc. Import Random and Scanner, other libraries as you need may be imported as well. Summary: You have seven dice. Both players start with 1 life. Distribute dice into one of the 4 categories below. o Speed: Higher total speed roll deals attack first o Normal Attack: success 4 or better - Add 3 damage o Life: success 4 or better Add 3 Life o Big attack: Success 4 or better - Add 5 damage take double damage Roll all dice simultaneously. Score and repeat if game is not over

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_2

Step: 3

blur-text-image_3

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

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

What was the outcome of the Paul v. Virginia case?

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago