Hi,
This is my code.The process was smooth but I still can not pass the level.I spent all time so is it because of my speed?My hero is THARIN.
Thanks for every reply.
loop:
coins=self.findItems()
coin=self.findNearest(coins)
self.move(coin.pos)
while self.gold > self.costOf("soldier"):
self.summon("soldier")
enemy = self.findNearest(self.findEnemies())
if enemy:
soldiers = self.findFriends()
soldierIndex = 0
while soldierIndex<len(soldiers):
soldier = soldiers[soldierIndex]
self.command(soldier, "attack", enemy)
soldierIndex+=1
Thank you for the suggestions.
My soldiers can not kill the last enemies.There are about 3 monsters.That is why I guess the speed is the problem.
By the way,I will keep trying.
Thank bmmtstb:
I already pass the level.But I do not know the reason.
I submitted the code again then I passed the level.
But if I try running the code(the left button), they spent all time.
What is the different about the left and right button?
with the submit button (right) you will always get a new random seed for your level. With the left u will always replay the last seed you have been given in your last submition.
Thats the reason why in repeatable levels you can fail in submission, because the seed is another…