CodeCombat - Coding games to learn Python and JavaScript?
Why is this code incomplete?
Munchkins are attacking!
The swarms will come at regular intervals.
Whenever you can, cleave to clear the mass of enemies.
while True:
# Use an if-statement with isReady to check “cleave”:
if hero.isReady(“cleave”):
# Cleave!
hero.cleave()
# Else, if cleave is not ready:
else:
enemy = hero.findNearestEnemy()
# Attack the nearest ogre.
hero.attack(enemy)