1-15 code as below
while True:
enemy = hero.findNearestEnemy()
hero.attack(enemy)
1-15 code as below
while True:
enemy = hero.findNearestEnemy()
hero.attack(enemy)
I know that this is a really old topic I am waking up, but I will continue anyway. You’re supposed to type down
while True:
enemy = hero.findNearestEnemy()
if enemy:
hero.attack(enemy)