define turnaround:
do 2:
turnleft
define backup:
turnaround
move
turnaround
define turnright:
do 3:
turnleft
define solve:
while next_to_a_beeper:
pickbeeper
if front_is_clear:
move
solve
backup
if left_is_clear:
turnleft
move
solve
backup
turnright
if right_is_clear:
turnright
move
solve
backup
turnleft
solve
turnoff
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment