Maze generation: Difference between revisions
→{{header|TXR}}: Do not pass unused variables through recursion. Use special variables to avoid passing down hashes.
(→{{header|TXR}}: Regen output.) |
(→{{header|TXR}}: Do not pass unused variables through recursion. Use special variables to avoid passing down hashes.) |
||
Line 4,677:
@(do
(defvar *r* (make-random-state nil))
(defvar vi)
(defvar pa)
(defun scramble (list)
Line 4,685 ⟶ 4,687:
out))
(defun
(tree-bind (x . y) loc
(list (- x 1)..y (+ x 1)..y
(defun make-maze-rec (cu)
(set [vi cu] t)
(
▲ (make-maze-rec w h vi pa ne))))))
(defun make-maze (w h)
Line 4,705 ⟶ 4,709:
(set [vi -1..y] t)
(set [vi w..y] t))
(make-maze-rec
pa))
|