loop:
flag = self.findFlag()
if flag:
fx = self.findFlag()
fy = self.findFlag()
self.buildXY("fire-trap", 30, 45)
self.pickUpFlag(flag)
self.buildXY("fire-trap", 30, 31)
self.buildXY("fire-trap", 30, 16)
else:
item = self.findNearestItem()
if item:
pos = item.pos
itemX = pos.x
itemY = pos.y
self.moveXY(itemX, itemY)
after character places 2nd mine in the middle they just walk into it and blow themselves up