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
else:
# 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.
Hi @gregbowers , welcome to the Discourse! This is a friendly place to chat and ask for help on CodeCombat levels (remember to format your code correctly). Before you continue, don’t forget to read the guidelines here if you haven’t already.
We hope you enjoy your time here!
Thank you for trying to help, but the user you replied to hasn’t been active for 8+ years, and that link doesn’t seem relevant to the topic.
There are always new posts in which you can try to help other users though, like the following: