Hey guys. This is another level I am having a hard time going.
It is called decoy drill. I know you have to break the loop in order for the computer to follow the code on the bottom. Somehow, it did not seem to. It only did the code on what the break is on top of. Here is my code first.
loop: decoysBuilt = 0 coin = self.findNearestItem() if coin: pos = coin.pos x = pos.x y = pos.y self.moveXY(x, y) if self.gold>=25: pos.x = pos.x - 5 pos.y = pos.y self.buildXY("decoy", pos.x - 5, pos.y) pass if decoysBuilt >= 4: break self.moveXY(14, 36) self.say("done building decoys!")
This makes sense to me. Somehow, the last two pieces of code are not done. Can you tell me why?