This level lags a lot and freezes after ~30 seconds displaying the infinite loop message. I will post only the parts of code I was supposed to write myself. I won’t post all the other code as I haven’t changed it.
Is there anything wrong with my code? (let’s suppose everything is indented properly)
# Figure out which enemy has the most health, and set bestTarget to be that enemy. for enemy in enemies: if enemy.health > mostHealth: mostHealth = enemy.health bestTarget = enemy
# Create a variable containing your archers. archers = hero.findByType("archer")
# use commandArcher() to command your archers for i in range(len(archers)): archer = archers[i] commandArcher(archer)