harvest1.wld ¶
def harvest(): move() pick_beeper() def harvest_row(num): repeat(harvest, num) turn_left() harvest_row(6) for num in [5,4,3,2,1]: harvest_row(num) harvest_row(num) turn_off()
trash1.wld ¶
def harvest(): while front_is_clear(): move() while on_beeper(): pick_beeper() harvest() repeat(turn_left, 2) harvest() repeat(turn_left, 3) move() while carries_beepers(): put_beeper() turn_off()