def summonTroops():
type = summonTypes[len(hero.built) % len(summonTypes)]
if hero.gold >= hero.costOf(type):
hero.summon(type)
def commandTroops():
friends = hero.findFriends()
for i in range(len(friends)):
friend = friends[i]
# Use % to wrap around defendPoints based on friendIndex
if friend:
defendPoint = len(friends) % ]defendPoints[len(defendPoints)
# Command your minion to defend the defendPoint
hero.command(friend, "defend", defendPoint)
while True:
summonTroops()
commandTroops()
This is my code, but I don’t understand what I’m supposed to do for line 12/13.