Level: Known Enemy

Our first foray into variables before removing enemy names from the world entirely, this is meant to make it easier for newbies to grasp variable state before throwing them into more complex variable assignment. We’d love to know if it accomplishes it’s goal.

Again with my son as an example, he thought this was pretty cool. The trouble came for him later when he thought that:

enemy = self.findNearestEnemy()

was setting it so that any time he used:

self.attack(enemy)

that the hero would look for the current nearest enemy. Thus he put that line at the beginning of his code for “The Final Kithmaze” and didn’t put it inside the loop. Took a bit of me working with him to understand his confusion. Check out the screencast from the folder I shared in hipchat to see this play out with him.

so how do you beat this level im on level 9 and i beat 14 so far i just need to pass known enemy

How do you pass known enemy