I started playing CodeCombat 2 days ago and thought it was a very well thought out and addictive game. I recently came to a level called ‘Endangered Burl’ and have spent at least an hour trying to complete it but nothing seems to work. At first, the character attacked both munchkins but hesitated to do so at the throwers. After a while of switching up code I found that my character wouldn’t move or attack enemies when I ran it.
Am I missing something blindingly obvious?
Merged Doublepost
Here is my code:
Loop:
enemy=self.findnearestenemy()
If enemy.type is "burl"
self.say("I am not attacking that Burl!)
If enemy.type is "munchkin" :
Self.attack(enemy)
If enemy.type is "thrower" :
Self.attack(enemy)
If enemy.type is "ogre" :
Self.moveXY(41,37)