A console-based MOBA-style Java game using full OOP design.
Feature | Description |
---|---|
Heroes | Base class + subclasses (Warrior, Mage) using inheritance |
Encapsulation | Properties like hp, name, skills are private with controlled access |
Abstraction | Hero, Skill, and StatusEffect are abstract base classes |
Polymorphism | Override methods like useSkill() and apply() |
Design Patterns | Factory Pattern (ChampionFactory) for champion creation |
Battle System | Turn-based loop: Player vs Bot |
Status Effects | Burn, Stun, and Heal effects via StatusEffect |
PvE Bot | Basic AI using random decisions |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
model/
├── Hero.java (abstract)
├── Warrior.java / Mage.java (extends Hero)
├── Skill.java (abstract)
├── BasicAttack.java / Fireball.java (extends Skill)
effect/
├── StatusEffect.java (abstract)
├── BurnEffect.java / HealEffect.java / StunEffect.java
factory/
├── ChampionFactory.java
main/
├── Main.java
Here are ways students can extend the game and keep learning:
Add cooldown to Skill class and prevent usage until ready.
1
2
protected int cooldown;
protected int currentCooldown;
Make bot evaluate HP, choose heal, or stun tactically.
Use file I/O to let users save and resume games.
E.g., ShieldEffect, PoisonEffect, SpeedBoost, etc.
Let players choose teams of 3 champions, battle in turns.
You’ve completed a full OOP Java game project using real-world design techniques. This foundation prepares students to: