Hello, I am a student and I have a problem with my code. My harchers move has kill the clones but my hero didn’t move.
def areAntipodes(unit1, unit2):
reversed1 = ""
for i in range(len(unit1.id) - 1, -1, -1):
reversed1 += unit1.id[i]
return reversed1 == unit2.id
friends = hero.findFriends()
enemies = hero.findEnemies()
for friend in friends:
for enemy in enemies:
if areAntipodes(friend, enemy):
hero.command(friend, ‘move’, enemy.pos)
enemies = hero.findEnemies()
while len(enemies) == 1:
hero.attack(hero.findNearest(hero.findEnemies()))
Can you help me?