I don’t know how to pass this level. Can anyone help?
Here is my code :
Tell the wizard the distance to the coming ogres.
This function finds the nearest enemy and returns the distance to it.
If there is no enemy, the function returns 0.
enemy = hero.findNearestEnemy()
result = 0
result = hero.distanceTo(enemy)
# Call nearestEnemyDistance() and
# save the result in the variable enemyDistance.
distance = nearestEnemyDistance()
# If the enemyDistance is greater than 0:
if distance > 0 :
# Say the value of enemyDistance variable.
I think this is complicated