Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

[SOLVED] The Two flowers. Please Help

This is my code:

If the peasant is damaged, the flowers will shrink!

def summonSoldiers():
if hero.gold >= hero.costOf(“soldier”):
hero.summon(“soldier”)

Define the function: commandSoldiers

def commandSoldiers():
friends = hero.findFriends()
for friend in friends:
enemy = friend.findNearestEnemy()
soldiers = hero.findByType(“soldier”)
for soldier in soldiers:
if enemy:
hero.command(soldier, “attack”, enemy)

Define the function: pickUpNearestCoin

def pickUpNearestCoin():
item = hero.findNearestItem()
if item:
hero.move(item.pos)
peasant = hero.findByType(“peasant”)[0]

while True:
summonSoldiers()
# commandSoldiers()
# pickUpNearestCoin()
commandSoldiers()
pickUpNearestCoin()

It says that I am not making the flower go to full size. Can anyone help me.

Never mind I figured out my mistake