Hey Guys I’m new to code combat I just started playing yesterday and I need help on Drop The Flag Level.
I don’t understand this flag code at all. Can somebody help me please? I fan
This is the original code and somebody help me
# Put flags where you want to build traps. # When you're not building traps, pick up coins! loop: flag = self.findFlag() if flag: # How do we get fx and fy from the flag's pos? self.buildXY("fire-trap", fx, fy) self.pickUpFlag(flag) else: item = self.findNearestItem() if item: pos = item.pos itemX = pos.x itemY = pos.y self.moveXY(itemX, itemY)