src/generation.lisp @ e63077fb7d6a

Binary tree generation
author Steve Losh <steve@stevelosh.com>
date Fri, 20 May 2016 21:59:56 +0000
parents 800b4dcae88c
children 901e9fc8958d
(in-package #:mazes.generation)

(defun gen-binary-tree (grid)
  (grid-loop-cells cell grid
    (let ((other (random-elt (full-list (cell-north cell)
                                        (cell-east cell)))))
      (when other
        (cell-link cell other)))))