Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Add functions to a video game in Java assignment In this assignment, you will refactor the adventure game that you coded in Assignments 2 and
Add functions to a video game in Java assignment
In this assignment, you will refactor the adventure game that you coded in Assignments 2 and 3 more specifically, you will write and use a number o custom Java classes and also make a few gameplay changes. Store your refactored "Adventure Game" code in a file named AdventureGameV2.java. Store your classes in the files Character.java, Player.java Enemy.java, and Weapon.java, and Potion.java The focus of this assignment is: (1) defining classes; (2) using inheritance; and (2) using objects Chang The player will go through both the Forest and the Graveyard, in that order The player will have an inventory that can store up to 5 potions . . The inventory will be implemented as an array of Potion objects o . The goblins and skeletons will drop coins when defeated o Each goblin/skeleton will drop a random number of coins in the range of 30 - 50 coins o When an enemy drops coins, add the number of coins dropped to the player's coin total Before visiting the Graveyard and before battling the Wizard, the player will have the . option to do one or more of the following o View stats This will print out the players current stats (to do this, simply print the string that is returned by the Player class's toString method) View the inventory o The player's inventory has 5 slots; each slot can hold 1 potion. When the player chooses to view the inventory, display a row for each slot, with the row number in brackets and the item name to the right of that (display the empty string if the slot is empty) For example, assume that my player has 3 items, with an item in slots 1 3 and 4. Then my inventory display would look like the following [1] Healing Potion 12] [3] Minor Strength Potion [4] Minor Healing Potion Purchase a potion o 2 types of Healing Potions - Minor Healing (5 Gold) and Healing (10 Gold) . A Minor Healing Potion adds 5 HP; a Healing Potion adds 10 In this assignment, you will refactor the adventure game that you coded in Assignments 2 and 3 more specifically, you will write and use a number o custom Java classes and also make a few gameplay changes. Store your refactored "Adventure Game" code in a file named AdventureGameV2.java. Store your classes in the files Character.java, Player.java Enemy.java, and Weapon.java, and Potion.java The focus of this assignment is: (1) defining classes; (2) using inheritance; and (2) using objects Chang The player will go through both the Forest and the Graveyard, in that order The player will have an inventory that can store up to 5 potions . . The inventory will be implemented as an array of Potion objects o . The goblins and skeletons will drop coins when defeated o Each goblin/skeleton will drop a random number of coins in the range of 30 - 50 coins o When an enemy drops coins, add the number of coins dropped to the player's coin total Before visiting the Graveyard and before battling the Wizard, the player will have the . option to do one or more of the following o View stats This will print out the players current stats (to do this, simply print the string that is returned by the Player class's toString method) View the inventory o The player's inventory has 5 slots; each slot can hold 1 potion. When the player chooses to view the inventory, display a row for each slot, with the row number in brackets and the item name to the right of that (display the empty string if the slot is empty) For example, assume that my player has 3 items, with an item in slots 1 3 and 4. Then my inventory display would look like the following [1] Healing Potion 12] [3] Minor Strength Potion [4] Minor Healing Potion Purchase a potion o 2 types of Healing Potions - Minor Healing (5 Gold) and Healing (10 Gold) . A Minor Healing Potion adds 5 HP; a Healing Potion adds 10Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started