λFPAI
Practice/Game Character System

Game Character System

Hard

Build a base Character class with health and attack.

Subclasses: Warrior, Mage, and Archer with unique abilities.

Use composition for Weapon and Armor. Implement a battle simulation using polymorphism.

OOP Focus: Composition over inheritance.

Note: This is statement-only in the current Practice version; stdout should be empty.

Loading editor...

Output

Run or submit to see output.