U E D R , A S I H C RSS

데블스캠프2005/RUR-PLE/Two More Selectable Harvest/이승한

데블스캠프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()
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:28:58
Processing time 0.0108 sec