Maze generation: Difference between revisions

Line 6,736:
either npos: newneighbour pos [
insert exploring npos
switchdo npos - posselect [
case 0x-1 [o: offsetof npos walls/:o/y: 0]
case 1x0 [o: offsetof pos walls/:o/x: 0]
case 0x1 [o: offsetof pos walls/:o/y: 0]
case -1x0 [o: offsetof npos walls/:o/x: 0]
] npos - pos
][
remove exploring
Line 6,763:
]
print ""
halt]</lang>
]
halt</lang>
{{out}}
<pre>Maze width: 15
Line 6,784 ⟶ 6,783:
|_ _ | | |_ |_ _ _ _ _ | |
|_ _ _ _|_ _ _ _ _ _ _ _|_ _ _|
(halted)</pre>
 
=={{header|REXX}}==
Anonymous user