Submission 3: ArrayLists
Objective: Use ArrayList
to manage collections within the game.
Instructions:
Enhance the
Player
Class:Replace
equippedItem
with:ArrayList<Item> inventory
Methods:
void addItem(Item item)
void useItem(String itemName)
void displayInventory()
Create Multiple Enemies:
Use
ArrayList<Enemy>
to manage a list of enemies.Enemies can be stored in different locations or levels.
Implement Inventory Management:
Allow the player to collect items from defeated enemies.
Provide options to use items from the inventory (e.g., health potions).
Update the Game Loop:
Incorporate multiple enemies and items.
Allow the player to navigate through enemies using simple text commands.
Deliverables:
Updated source code files.
A screenshot of the Program running
COSC-1437 / ITSE-2457 Computer Science Dept. - Author: Dr. Kevin Roark