My problem is than i can’t collect 32 coins but i can run from dungeon.
My code:
steps = 1
while True:
# If the number of steps is divisible by 3 AND by 5 -- move to North-West
if steps % 3 == 0 and steps % 5 == 0:
hero.moveXY(hero.pos.x - 10, hero.pos.y + 10)
# Else if the number of steps is divisible by 3 -- move to East
elif steps % 3 == 0:
hero.moveXY(hero.pos.x + 10, hero.pos.y)
# Else if the number of steps is divisible by 5 -- move to West
elif steps % 5 == 0:
hero.moveXY(hero.pos.x - 10, hero.pos.y)
# Else move to North
else:
hero.moveXY(hero.pos.x, hero.pos.y + 10)
steps += 1