Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Dueling Grounds


I don’t understand what I am doing wrong in this level. My code looks like this:


But it tells me that the enemy is not defined. I don’t understand. I’ve tried moving to different places. My character just won’t attack.


Did you assign self.findNearestEnemy() to a variable?

Did you define enemy?

(Hint: enemy = ???)

(Also, use the triple backticks (```) to wrap your code next time.)


Thank you. I figured it out.