Guys I don’t get how to use arrays and a while cycle.
My guy that stand one place and doing nothing.
# Use while loops to pick out the ogre loop: enemies = self.findEnemies() enemyIndex = 0 # Wrap this logic in a while loop to attack all enemies. enemy = enemies[enemyIndex] # "!=" means "not equal to." if enemy.type != "sand-yak": # While the enemy's health is greater than 0, attack it! pass # Between waves, move back to the center.
so I did by my own
loop: enemies = self.findEnemies() for enemy in enemies: if enemy.type != 'sand-yak': self.attack(enemy) self.powerUp() self.bash(enemy)
and i kill all stinky ogres in 35.3s (2nd place for today at this level, guys)
so I did level but don’t get anything =(