Anonymous user
Maze generation: Difference between revisions
m
→{{header|Icon}} and {{header|Unicon}}: added a cleanup step
(→{{header|Icon}} and {{header|Unicon}}: + enhanced window parameters, title, simplified wall clearing) |
m (→{{header|Icon}} and {{header|Unicon}}: added a cleanup step) |
||
Line 1,076:
rd := [NORTH, EAST, SOUTH, WEST] # initial list of all directions
GenerateMaze(r,c) # recurse through maze
every r := 1 to *maze & c := 1 to *maze[r] do # keep only directions
maze[r,c] := iand(maze[r,c],NORTH+EAST+SOUTH+WEST)
return 1(.maze,maze := &null) # return maze and reset for next
}
|