i am stuck
here is the code:
Your goal is to protect the peasant and move to the right.
Arryn Stonewall will defend the front, and command the soldiers.
You need to cover the rear and command t
arryn = self.findByType(“raider”)
peasant = self.findByType(“peasant”)
# Return either “fight” or “advance”.
# Try to stay 5m behind the peasant when not fighting.
# Don’t get more than 15m away from the peasant.
# Stop the ogres from rushing past you to get to the peasant!
# Hint: try to slow them down if you can
# Stay behind the peasant
# Return “follow”, “build-above”, or “build-below”
# Hint: use isPathClear() to determine where the hallways are
# Keep the peasant behind Arryn and her soldiers.
self.command(peasant, “move”, arryn.pos.x-5,arryn.pos.y)
# Command the peasant to build a palisade.
self.command(peasant, “BuildXY”, x,y)
heroStrategy = chooseHeroStrategy()
if heroStrategy == “fight”:
elif heroStrategy == “advance”:
peasantStrategy = choosePeasantStrategy()
if peasantStrategy == "build-above":
peasantBuild(peasant.pos.x, peasant.pos.y + 5)
elif peasantStrategy == "build-below":
peasantBuild(peasant.pos.x, peasant.pos.y - 5)
elif peasantStrategy == "follow":