hi. i’m completely confused as to what to do on this level. here is my code:
def isSubstring(word, substring):
rightEdge = len(word) - len(substring)
for i in range(rightEdge + 1):
for j in range(len(substring)):
shiftedIndex = i + j
if word[shiftedIndex] != substring[j]:
break
if j == len(substring) - 1:
return True
return False
enemies = hero.findEnemies()
for e in range(len(enemies)):
enemy = enemies[e]
if isSubstring(enemy, "bos"):
hero.attack(enemy)