Map link - https://codecombat.com/play/level/greed-traps?
I am on the Greed Traps map and for some reason the map isn’t working properly.
This is the initial instructions filled out with exactly what the developer asked the user to input:
# Patrol and place traps ONLY if you see a coin. # Write this function. def maybeBuildTrap(x, y): # Move to the given x,y postion hero.moveXY(x, y) # Search a coin and if you see it, build a "fire-trap" item = hero.findItems() if item == "coin": hero.buildTypes("fire-trap", x, y) pass while True: # Call maybeBuildTrap for the top left passage. maybeBuildTrap(12, 56) # Now for the top right passage. maybeBuildTrap(68, 56) # Now for the bottom right passage. maybeBuildTrap(68, 12) # Now for the bottom left passage. maybeBuildTrap(12, 12)
Now, I run the script and the hero does move to every X without difficulty. However, he does not detect items nor does he lay down fire-traps. I have tried to modify my code to make this map work properly but I am a novice programmer at best. Maybe one of you more experienced users can figure this out or assist me in figuring out a solution to this problem. Thanks for the assist