I don’t have any code I want to develop a strategy as I go. I don’t know who the level really works. I tried to do basic code like this.
while True:
friends = hero.findFriends()
friend = hero.findNearest(friends)
flag = hero.findEnemyFlags()
enemies = hero.findEnemyFlags()
nearest = hero.findNearest(enemies)
if nearest:
hero.move(nearest.pos)
if hero.distanceTo(nearest) <= 3:
hero.captureFlag(flag)
hero.moveXY(43, 60)
if flag:
hero.placeFlag(friend.pos)
I don’t understand why it does not work.