I need help on the level Oasis. Here is my code:
loop:
x = self.pos.x
y = self.pos.y
enemy = self.findNearestEnemy()
if enemy and self.distanceTo(enemy) < 10:
# Move to the left by subtracting 10 from your X coordinate.
x = x - 10
else:
# Move to the right by adding 10 to your X coordinate.
x = x + 10
self.moveXY(x, y).
here is the link: