U E D R , A S I H C RSS

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

Difference between r1.2 and the current

@@ -1,4 +1,55 @@
* Maze.rur
=== Harvest.rur ===
{{{
def turn_right():
repeat(turn_left,3)
def getbeeper():
while on_beeper():
if on_beeper():
pick_beeper()
 
while True:
if front_is_clear():
move()
getbeeper()
else:
turn_left()
if facing_north():
move()
getbeeper()
turn_left()
else:
repeat(turn_left,2)
move()
getbeeper()
turn_right()
turn_off()
}}}
 
=== Trash.rur ===
{{{
def turn_right():
repeat(turn_left,3)
def getbeeper():
while on_beeper():
if on_beeper():
pick_beeper()
def putbeeper():
while carries_beepers():
put_beeper()
 
while not right_is_clear():
if front_is_clear():
move()
getbeeper()
else:
repeat(turn_left,2)
turn_right()
move()
putbeeper()
turn_off()
}}}
 
=== Maze.rur ===
{{{
def turn_right():
repeat(turn_left,3)


Harvest.rur


def turn_right():
    repeat(turn_left,3)
def getbeeper():
    while on_beeper():
        if on_beeper():
            pick_beeper()

while True:
    if front_is_clear():
        move()
        getbeeper()
    else:
        turn_left()
        if facing_north():
            move()
            getbeeper()
            turn_left()
        else:
            repeat(turn_left,2)
            move()
            getbeeper()
            turn_right()
turn_off()

Trash.rur


def turn_right():
    repeat(turn_left,3)
def getbeeper():
    while on_beeper():
        if on_beeper():
            pick_beeper()
def putbeeper():
    while carries_beepers():
        put_beeper()

while not right_is_clear():
    if front_is_clear():
        move()
        getbeeper()
    else:
        repeat(turn_left,2)
turn_right()
move()
putbeeper()
turn_off()

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()
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:13
Processing time 0.0304 sec