The idea
Create battles where a player must choose a strategy, not repeatedly press attack. Different creatures should share common rules while offering meaningful strengths and trade-offs.
See this learning levelWhat you will build
- A roster of independent creatures with health, energy and a choice of moves.
- Attack, defend and recovery actions with costs, cooldowns and status-effect durations.
- A round-by-round battle log and a league table that records wins and losses.
How it fits together
Model Creature, Move and Battle as separate classes. A Battle controls turn order and victory; creatures own their health and energy. Pass a seeded random source into damage calculations so tests can reproduce a match.
Build milestones
Model the roster
Define three creatures and a shared move format. Instantiate two of the same species and prove they hold independent state.
Resolve one turn
Validate moves, apply costs and damage, and clamp health and energy to their allowed ranges.
Build the league
Add opponent choices, multi-round matches and standings. Keep presentation separate from battle logic.
Balance the rules
Run repeatable matchups, inspect dominant strategies and tune one parameter at a time. Document the reasoning.
How you will know it works
- An unaffordable move does not spend energy or advance the turn.
- A defeated creature cannot act, and a finished match cannot award a second win.
- Status effects expire on the intended turn; a new match resets temporary effects.
What you will finish with
A local Python league game, a class diagram, reproducible battle tests and a short balance report.
Take it further
Add a new creature and move through data configuration without rewriting the turn engine.