Question: You have been asked to create a system to allow the simulation of tabletop games. Specifically, you are asked to create a system that simulates
You have been asked to create a system to allow the simulation of tabletop games. Specifically, you are asked to create a system that simulates the dice rolls from games like D&D Pathfinder and Settlers of Catan. The process of the game will be as follows:
The characters health and resistances will be set at the start randomly.
The enemies base attack value will be set at the start randomly.
The player will choose a type of dice and a number of rolls. They will then click on the appropriate attack button for the type of attack they wish to make.
The game will roll the dice supplied in step the appropriate number of times and sum the result.
The game will subtract the characters resistance for the attack type from the result in step and the final value will be subtracted from the characters health.
Solution Steps
Your program should:
Have a game play UI based on the example provided at the end.
Create the following dice: D D D D D
Create a character and enemy object to complete the simulation.
Roll the sided die D times at the start to set the Characters health value.
Roll the sided die times to set each of the Characters resistances. One for each resistance.
Allow the user to choose a dice and roll that dice as many times as they need: ie if they need to roll a sided dice twice, your program should do that automatically.
Use a GUI library as the basis for the UI interface.
You should have classes for each of the required components, ie main, dice, character etc.
I will test the system making the following rolls:
ad
bd
cd
Questions to Answer
In order to solve this problem, you need to be able to answer these questions:
What is the base class for my character system? What are the child classes?
What is the base class for my dice roller?
How can you use classesinheritanceinterfaces to make your classes functional and extensible?
What is the best way to roll a created dice multiple times?
What branching statement works best for testing different types of resistance interactions?
How can you perform an error checking to ensure every piece of information you need is set before you roll your dice?
How do you keep track of the result of each step of the calculation to make the final change to health?
Part I Algorithm
Write an algorithm or create a flow chart to lay out the steps to solve the problem. Be sure to include a list of any data you need to keep track of and the correct data types. Be sure that there are no hidden steps in the solution.
Part II UI Design
Design a user interface for your program. You may use Swing, JavaFX or any other GUI library available for Java. Your interface does not have to look like the example. However, it does need to provide all of the required functionality and feedback needed for the tasks listed in the solution steps section.
Part III Code
Write the code to implement the steps you created above. Only the items listed in the algorithm are allowed to be present in your code. Your code must function without error, and you must use appropriate exception handling it is a requirement listed in # under Questions to Answer You must use separate java files for each of your classes. Your code will be evaluated against the requirements listed on the first page as well as against your Algorithm from part I.Project Example
When finished you should submit all of your files including your algorithm documentation as a single zip file to the drop box
ScreenshotProject Example Screenshot
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
