Could someone help me on Return to Thornbrush Farm? I keep killing a villager that I’m not supposed to kill. Here’s the code: # The function maybeBuildTrap defines TWO parameters!
def maybeBuildTrap(x, y):
# Use x and y as the coordinates to move to.
enemy = hero.findNearestEnemy()
# Use buildXY to build a “fire-trap” at the given x and y.
hero.buildXY(“fire-trap”, 43, 50)
# This calls maybeBuildTrap, with the coordinates of the top entrance.
# Now use maybeBuildTrap at the left entrance! maybeBuildTrap(25,34) # Now use maybeBuildTrap at the bottom entrance! maybeBuildTrap(43,20)