데블스캠프2005/RUR-PLE/TwoMoreSelectableHarvest/이승한

~cpp 
def turnRight():
    repeat(turn_left,3)
def turnBack():
    repeat(turn_left,2)
def moveFrontPick():
    while(1):
        if next_to_a_beeper():
            pick_beeper()
            if not next_to_a_beeper():
                put_beeper()
        if front_is_clear():
            move()
        else:
            break

def moveBackPick():
    if not next_to_a_beeper():
        put_beeper()
    else:
        move()

def checkLine():
    moveFrontPick()
    turnBack()
    repeat(moveBackPick,6)
    turnRight()
    move()
    turnRight()

##main
repeat(checkLine,6)
turn_off()
Retrieved from http://wiki.zeropage.org/wiki.php/데블스캠프2005/RUR-PLE/TwoMoreSelectableHarvest/이승한
last modified 2021-02-07 05:28:58