Build classes and subclasses needed for a game called Outlier Odyssey. In this game, a player will
Question:
Build classes and subclasses needed for a game called Outlier Odyssey. In this game, a player will navigate a two-dimensional map from one corner to another with limited resources while encountering hazards. Make sure to follow the UML diagram when solving the problem.
Running the Game
The maze is a 2D String array. The game will start with a reserved cell for the player (P) and one random cell containing a magical gem (GEM)! Every other cell will be randomly assigned to one of the following hazards: wolf, bear, elk, or hare. Hazards will have higher-value costs further into the board.
The player starts in the top-left corner with 500 health and must travel to the bottom-right corner without running out of health. For each turn, the player can move up, down, left, or right. After selecting a direction, the player is given a preview of the hazard in the chosen cell. Then, they can confirm the move or opt out and choose a new direction.
As the player traverses the maze, their health changes according to the hazards they reach. Once the player has visited a cell, the cell value changes to "X"—the hazard has been neutralized and the player can revisit the cell without any change in health.
The game ends when the player reaches the bottom right-hand corner of the maze or when they run out of health.
Implementation
You will be responsible for completing components in four classes. You can either start from the top of the class hierarchy and work down or start at the bottom and work up. As you work, initialize and test objects in the OutlierOdyssey.java file (at the bottom). Make sure to test frequently! The following UML diagram displays the full class structure with components that need to be completed in pink:
Microeconomics An Intuitive Approach with Calculus
ISBN: 978-0538453257
1st edition
Authors: Thomas Nechyba