I need help on thunderhooves
Here is my code:
yak = hero.findNearestEnemy()
# If yak.pos.y is greater than hero.pos.y
if yak.pos.y > hero.pos.y:
# buildXY a "fence" 10m below the yak. O = yak.pos.y - 10 hero.buildXY("fence", 18, O) # else: else: # buildXY a "fence" 10m above the yak. S = yak.pos.y + 10 hero.buildXY("fence", 36, S) pass else: # moveXY right 10m towards the oasis. P = hero.pos.x + 10 hero.moveXY(P, 30) pass
My hero gets to the oasis, but all the yaks are chasing her. I can’t get to the end because she dies.