I have a problem with Greed Traps level. I think that the code is OK (correct me if I'm wrong). The point being I collect the coin because it is direcly placed on the way to the designated coordinates. Is it a bug?
#Patrol and place traps ONLY if you see a coin.
# Write this function.
def maybeBuildTrap(x, y):
# Move to the given x,y postion
# Search a coin and if you see it, build a "fire-trap"
item = hero.findNearestItem()
hero.buildXY("fire-trap", x, y)
# Call maybeBuildTrap for the top left passage.
# Now for the top right passage.
# Now for the bottom right passage.
# Now for the bottom left passage.