I’ve read all the topics related to this level, but I still feel like I don’t understand enough of this difficult level to improve my code:
coins = hero.findItems()
badCoins = []
goodCoins = []
for i in range(len(coins)):
coinI = coins[i]
for j in range(len(coins)):
coinJ = coins[j]
if coinI == coinJ:
continue
if coinI.value == coinJ.value:
badCoins.append(coinJ)
if coinI.value != coinJ.value:
goodCoins.append(coinI)
for i in goodCoins:
hero.moveXY(i.pos.x, i.pos.y)
All that happens is that my hero just moves in this weird figure and stops at some point:
I hope somebody can give me some advice. Maybe @Deadpool198 because you are the most ardent poster about this level? I would be grateful to anyone though