Sorting ¶
def r(): turn_left() turn_left() turn_left() def l(): turn_left() def line_sort(): while front_is_clear(): if on_beeper(): pick_beeper() move() if on_beeper(): pick_beeper() l() l() while carries_beepers(): put_beeper() if front_is_clear(): move() while front_is_clear(): move() l() move() move() move() move() r() line_sort() l() move() l() line_sort() l() move() l() line_sort() l() move() l() line_sort() l() move() l() line_sort() turn_off()