# Wrap this logic in a while loop to attack all enemies.
while enemyIndex < len(enemies):
enemy = enemies[enemyIndex]
# “!=” means "not equal to."
if enemy.type != “sand-yak”:
# While the enemy’s health is greater than 0, attack it!
while enemy.health > 0:
self.attack(enemy)
enemyIndex += 1
# Between waves, move back to the center
self.moveXY(39, 32)
For someone who joined almost a month ago, one would think that they would have read the FAQ and learned how to format your code properly. Please do so, then we will examine your code.
In the FAQ, there is a section called Post your code with radiant, harmonious formatting in bold. This section is in the section I need help with my code!