In the level Friend and Foe in the Backwoods Forest, I am having trouble figuring out the correct way to complete the level. Here is my code:
# Peasants and peons are gathering in the forest.
# Command the peasants to battle and the peons to go away!
while True:
friend = hero.findNearestFriend()
enemy = hero.findNearestEnemy()
if friend:
hero.say("To battle, " + friend.id + "!")
# Now find the nearest enemy and tell them to go away.
if enemy:
hero.say("Go away, " + enemy.id + "!")
Any suggestions?