Hello I need help to pas this level “Hold the forest pass” This is my code # Use flags to join the battle or retreat.
If you fail, press Submit again for new random enemies and try again!
You’ll want at least 300 health, if not more.
loop:
enemy = self.findNearestEnemy()
flag = self.findFlag()
if flag:
# Pick up the flag.
pass
self.pickUpFlag(flag)
elif enemy:
# Fight!
pass
self.attack(enemy)
self.attack(enemy)
self.attack(enemy)
self.attack(enemy)
flag = self.findFlag(“green”)
pass
self.pickUpFlag(flag)