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()