Hi everyone! I am currently stuck on the Noble Sacrifice level. I would like some help with this. When I run my code, only one of the soldiers moves to the point (90,52) while the others don’t move at all. I posted the code below. Also, I am really new to this, so I’m sorry if I did anything confusing or wrong! Thanks for your help!
# Collect 80 gold
while hero.gold <= 80:
coin = hero.findNearestItem()
if coin:
hero.move(coin.pos)
soldiers = 0
while soldiers < 4:
if hero.gold >= hero.costOf("soldier"):
hero.summon("soldier")
soldiers += 1
# Send your soldiers into position
points = []
points[0] = { "x": 13, "y": 73 }
points[1] = { "x": 51, "y": 73 }
points[2] = { "x": 51, "y": 53 }
points[3] = { "x": 90, "y": 52 }
friends = hero.findFriends()
# Use range to make an array to loop over.
while True:
for j in range(len(friends)):
point = points[j]
friend = friends[j]
if friend:
hero.command(friend, "move", points)