GamingMax Corporation is a start-up gaming business and is developing its first game with a working title, called 'Battle Simulation'. The game has a basic AI ogre characters, however you have recently been hired to finish their game. Your task is to implement basic AI hero characters with additional characteristics, provided to you in our skeleton code for a simple command line application.
The skeleton code is made up of four classes:
In addition to the four classes, further classes will be needed to support the game.
Currently, the game is in working order and is in the following state:
Your task, is to add an interaction menu, create, add and sort hero characters to the simulation, allow the hero and ogre characters to fight within the simulation, either resulting in game over or win and finally that the hero can use items, such as swords, armour and potions.
Implement the method void menu() within the BattleSimulationEngine in the skeleton code, which allows the player to do the following action:
The menu method is the only method that can create and use the scanner class, therefore the scanner should be local to the menu method.
Create a Hero class that extends the Entity class, furthermore you must override the methods that the Entity class is enforcing. These enforcing methods include the following:
Additionally, hero characters' health must be set between a random value of 150 and 500 and therefore underpowered compared to the ogres which have a health of 1000. This health value is set before the simulation starts.
The hero characters must be set to the hero team.
The DAMAGE variable is inherited from the Entity class, thus both the Hero and Ogre class can attack each with the same amount of damage.
The maximum number of hero characters that be created is four and need to be added to the entity array.
Hero characters need to be able to attack and be hurt by the ogres.
After which, the simulation should have the eight entities fighting each other, please note that the hero characters should not attack another hero character, only the ogre characters.
Once the hero characters have zero or less, then that character is dead and set null, no longer able to perform any more actions.
Hint: It is likely that your heroes will be defeated at this point.
Create one super class called Item and three additional sub classes called Sword, Armour and Potion.
The Item class must have a name that shared with other sub classes, i.e. to obtain the name of a sword, the name must be located within the Item class, not the Sword class.
Each of the subclasses must do the following:
Apply these subclasses to the hero class and to be use in the simulation.