Level : Oasis not sure if bug or my mistake

loop:
enemy = self.findNearestEnemy()
if enemy and self.distanceTo(enemy) < 20:
newX = self.pos.x - 4
newY = self.pos.y
self.moveXY(newX, newY)

else:
    newX = self.pos.x + 4
    newY = self.pos.y
    self.moveXY(newX, newY)

I guess we also thought you’d use 10 for the distance check instead of 20. Maybe that was the difference?

Following the instructions doesn’t work. I am using Anya with the leather boots and the +5 glasses.

loop:
enemy = self.findNearestEnemy()
if enemy and self.distanceTo(enemy) < 10:
# Move to the left by subtracting 10 from your X coordinate.
newX = self.pos.x - 10
newY = self.pos.y
self.moveXY(newX, newY)
else:
# Move to the right by adding 10 to your X coordinate.
newX = self.pos.x + 10
newY = self.pos.y
self.moveXY(newX, newY)

I can’t figure out how to make it maintain the levels when pasting.