FizzBuzzPath Help Me pls

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


My equip

Ah, I see the problem.
The mimic is pulling the coins with it, but your hero isn’t coded to go back to pick them up.
Try unequipping the mimic or using a different pet, and it should work fine :wink:
Marmite

2 Likes

Thank you. Pet replacing help me.I just looking for solution and couldn’t find it even though the code seems to be correct.
изображение_2023-01-21_113104493

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.