I have a problem with this level.
My code is:
# Put flags where you want to build traps.
# When you're not building traps, pick up coins!
flag = self.findFlag()
# How do we get fx and fy from the flag's pos?
# (Look below at how to get x and y from items.)
fPos = flag.pos
fx = fPos.x
fy = fPos.y
self.buildXY("fire-trap", fx, fy)
item = self.findNearestItem()
itemPos = item.pos
itemX = itemPos.x
itemY = itemPos.y
When i put a flag my hero stays in one place and doesn't move. see below
what is wrong with this code? i can't figure it out.