It seems that if the treads on the ogre are the last thing destroyed (which should be the normal case) then the program ends up stuck in the attack loop because there is nothing on the ogre to attack. In other words it doesn't recognize when you win. Haven't you authors beaten it yet?