The Two Flowers - Python

# If the peasant is damaged, the flowers will shrink!

def summonSoldiers():
    if >= hero.costOf("soldier"):

# Define the function: commandSoldiers
def commandSoldiers ():
    hero.command(Soldiers, "attack", target)
# Define the function: pickUpNearestCoin
def pickUpNearestCoin ():
    peasant = hero.findByType("peasant")[0]

while True:
    # commandSoldiers()
    # pickUpNearestCoin()

1 Like


never mind
just a typo

But I still need help.

Well, there’s a lot missing. Your commandSoldiers function needs to have a lot more code defining enemy and soldiers and use a loop. Your pickUpNearestCoin function contains zero code regarding finding and moving to a coin’s position to pick it up. Your while True loop doesn’t contain enough code either. You need to call all 3 of your functions there.

1 Like

(20 chars)