This project implements a modular and object-oriented text-based adventure game. Below is a high-level summary of the class structure:
Represents the player character.
Fields: position (x, y), HP, equipped weapon, key possession
Methods: move(), attack(), pickUp(), takeDamage(), etc.
Represents an enemy in the room.
Fields: name, position, HP, damage, key drop flag
Methods: takeDamage(), dealDamage(), dropsKey()
Represents a single room loaded from a CSV file.
Fields: grid, monsters, items, doors, hero spawn position
Methods:
loadFromCSV()saveToCSV()checkInteractions()display()
Represents a door to another room.
Fields: position, destination path, door type ('d' or 'D')
Methods: isMasterDoor()
Interface for usable items.
Methods: use(Hero hero), getSymbol()
Represents a weapon.
Fields: name, damage, symbol
Methods: use(Hero), getSymbol()
Represents a healing potion.
Fields: heal amount, symbol
Methods: use(Hero), getSymbol()
Main controller for the game logic.
Handles: game loop, transitions, player status, and file I/O
Program entry point.
Starts the game using Game.start()
💡 Designed using modular OOP principles with clear class responsibility separation.