Verified interview challenge
Build a turn-based monster battle simulator
Keep a battle simulation correct as damage rules and attacker selection become more complex.
Unlock with Full AccessThe challenge
Start with a basic turn-based battle between two teams, then extend the same classes and battle function. Later parts add elemental types and a rule for choosing the best attacker. The exercise asks you to preserve event order and evolving team state while accommodating the new mechanics.
What you'll practise
Simulation ordering
Keep attacks and state transitions consistent throughout a battle.
Extensible mechanics
Add damage and selection rules without breaking earlier behaviour.
# Build on your implementation
# Run checks for the current part
# Full starter code includedRun your code to see results.