A beginner-friendly Java game that demonstrates core Object-Oriented Programming concepts. The game features a variety of enemies—Goblins, Ghosts, Ogres, and Dragons—each implemented as a separate class with unique behaviors using inheritance and polymorphism.
- Java-based OOP structure
- Inheritance and method overriding
- Enemy interactions with basic game logic
- Open the project in your favorite Java IDE (like IntelliJ or Eclipse).
- Compile all
.javafiles in thesrcfolder. - Run
Main.javato start the simulation.
Enemy.java– Base classGoblin.java,Ghost.java,Ogre.java,Dragon.java– Derived enemy typesEnemyGame.java,Main.java– Game logic and entry point
Note: This project is for learning purposes and showcases class hierarchy, method overriding, and Java fundamentals.