it’s because when you use hero.move, the statement will run for one step before finishing, meaning that a conditional will instantly update after the statement ran.
compared for moveXY which will only finish after the hero has moved all the way back.
This is important because when you use hero.move the hero will find a clear path to a gem while walking back, and will instantly change course. Comparing this to moveXY, the hero will literally just move into the bear traps before changing course even if it sees a new gem.
Hi @Lulee1! Welcome to the CodeCombat Discourse! This is a safe place to chat and ask for level help. Before you begin your journey, could you please go through our rules that make this discourse an awesome place? It helps us all We hope you enjoy your stay!!