Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

데블스캠프2011/셋째날/RUR-PLE/박정근: Difference between revisions

From ZeroWiki
imported>pjk41018
No edit summary
 
imported>pjk41018
No edit summary
Line 1: Line 1:
ㅇㄹㅇㄹㅇ
* Maze.rur
def turn_right():
    repeat(turn_left,3)
while not on_beeper():
    if left_is_clear():
        turn_left()
        move()
    elif front_is_clear():
        move()
    elif right_is_clear():
        turn_right()
    else:
        repeat(turn_left,2)
pick_beeper()
turn_off()



Revision as of 09:15, 29 June 2011

  • Maze.rur
def turn_right():
    repeat(turn_left,3)

while not on_beeper():
    if left_is_clear():
        turn_left()
        move()
    elif front_is_clear():
        move()
    elif right_is_clear():
        turn_right()
    else:
        repeat(turn_left,2)
pick_beeper()
turn_off()