@prog air-2.muf 1 999 d 1 i : top #17719 ; : walkexits top swap begin dup while 1 strcut rot rot rmatch getlink swap loop pop ; : doublelink (r1 r2 n1->2 n2->1 -- ) ( me @ "doublelink: " 6 pick name strcat "/" strcat 5 pick name strcat "/" strcat 4 pick strcat "/" strcat 3 pick strcat notify ) 3 pick open 4 pick addlink rot open swap addlink ; : step-east dup not if exit then dup strlen dup 2 = if 3 else 2 then ( n str- ln ) rot rot 1 - strcut atoi dup 4 pick % if 1 + else swap step-east dup if swap 3 pick - 1 + else pop pop pop "" exit then then intostr strcat swap pop ; : step-south dup not if exit then dup strlen dup 2 = if 3 else 2 then rot rot 1 - strcut atoi rot + dup 6 > if swap step-south dup if swap 6 - else pop pop "" exit then then intostr strcat ; : walk-east dup walkexits begin swap step-east dup while dup walkexits rot over "e;east" "w;west" doublelink loop pop pop ; : walk-south dup walkexits begin swap step-south dup while dup walkexits rot over "s;south" "n;north" doublelink loop pop pop ; : do-level dup begin dup while dup walk-east step-south loop pop begin dup while dup walk-south step-east loop pop ; : main "1" do-level "11" do-level "111" do-level me @ "Done." notify ; . c q