I want to do in python and have this code:
while True:
enemy = hero.findNearestEnemy()
if enemy:
distance = hero.distanceTo(enemy)
if distance < 15:
if hero.isReady("throw"):
hero.throw(enemy)
else:
hero.attack(enemy)
now I have the problem, that my bomb is too late. How I can solve this? thanks in advance