I can't seem to figure out how to do the level Oasis. How do you do it?


I can’t find the code for the level Oasis.
Can you help me? 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

    # Move to the right by adding 10 to your X coordinate.
    x = x + 10
    self.moveXY(x, y)


Well, give us your code so that we can help you. We are not omniscient; we do not know what your problem is. Don’t forget to read the FAQ to learn how to format your code.


I’m his brother and I know his problem. Though I don’t know how to solve it either.

Here is my code. It worked once but now it doesn’t.

# Use “if” to only move when a yak is less than 10m away.
enemy = self.findNearest(self.findEnemies())
if enemy:

    if self.distanceTo(enemy) < 10:
        x = self.pos.x + 10
        y = self.pos.y
        self.moveXY(x, y)


You need to move to the left if the closest Yak is too close.


Why do you always say the community isn’t omniscient or omnipotent, it’s just a really funny thing to say!


@ARasberrypy-thon Unfortunately, several people that ask for help do not realize that they also need to help us help them.


Very easy to argue, yeah.