这一关,如何生存2分钟?空闲时间如何移动,如果在移动时,如何攻击目标,放弃移动?
# Stay alive for two minutes.
# If you win, it gets harder (and more rewarding).
# If you lose, you must wait a day before you can resubmit.
# Remember, each submission gets a new random seed.
loop:
enemies = self.findEnemies()
enemiesindex = 0
while enemiesindex < len(enemies):
enemy = enemies[enemiesindex]
enemiesindex += 1
if enemy.type != "sand-yak":
while enemy.health > 0:
if self.isReady("bash"):
self.bash(enemy)
else:
self.attack(enemy)
elif self.findNearest(enemies):
self.moveXY(93, 70)