I was going back in the mountain levels and retried this one. For some reason I can’t go back to the middle without running into traps yet I followed the tips exactly.
while True: gem = hero.findNearest(hero.findItems()) if gem: clear = hero.isPathClear(hero.pos, gem.pos) # The isPathClear method tells you if there’s an obstacle in the way. # If it’s clear, move() to gem.pos. if clear: hero.move(gem.pos) # Else, move back to the center point. else: hero.moveXY(40, 35)