I can’t figure out what is wrong with my code, here it is:
hero.cast(“fire-ball”)
while True:
missile = hero.findMyMissiles
print(missile.pos.x)
if hero.color == “red” and missile.pos.x > 50:
break
elif hero.color == “blue” and missile.pos.x < 50:
break
print(“End of loop”)
I would appreciate it if you could figure out the problem with my code
hero.cast("fire-ball")
while True:
missile = hero.findMyMissiles
print(missile.pos.x)
if hero.color == "red" and missile.pos.x > 50:
break
print("End of loop")
hero.cast("fire-ball")
while True:
missile = hero.findMyMissiles
print(missile.pos.x)
if hero.color == "red" and missile.pos.x > 50:
break
print("End of loop")
hero.cast("fire-ball")
while True:
missile = hero.findMyMissiles()
if missile:
print(missile.pos.x)
if hero.color == "red" and missile.pos.x > 50:
break
print("End of loop")
hero.cast(“fire-ball”)
while True:
missile = hero.findMyMissiles()
if missile:
print(missile.pos.x)
if hero.color == “red” and missile.pos.x > 50:
break
print(“End of loop”)