i just refreshed my code for help please help me
# Use different colored flags to perform different tasks.
while True:
flagGreen = hero.findFlag("green")
flagBlack = hero.findFlag("black")
# If there's a flagGreen...
# Build a "fence" at flagGreen's position.
# Pick up the flag!
# If there's a flagBlack...
# Build a "fire-trap" at flagBlack's position.
# Pick up the flag!
# Move back to the center.
hero.moveXY(43, 31)