I need help on the level return to thorn bush farm
# The function maybeBuildTrap defines TWO parameters! def maybeBuildTrap(x, y): # Use x and y as the coordinates to move to. hero.moveXY(x, y) enemy = hero.findNearestEnemy() if enemy: pass # Use buildXY to build a "fire-trap" at the given x and y. while True: # This calls maybeBuildTrap, with the coordinates of the top entrance. maybeBuildTrap(43, 50) # Now use maybeBuildTrap at the left entrance! # Now use maybeBuildTrap at the bottom entrance!
click this button then post your code inside it
your code is not full inside the formatted place
you didn’t build a trap when your done that you should be gode.
What you need to do is write
hero.buildXY("fire-trap",x,y) underneath this line. Then, in your while true loop, you need use maybeBuildTrap() at the left and bottom entrances.
Glad to help.
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.