clojure-rica/maize — pull request #3 by chrishunt (2014-02-25 21:12:00+00:00)
Title: Use same depth-first-search for generate and solve

SJO :airplane: PHX

`generate-maze` and `search-maze` use an identical search. This pulls the algorithm into `search-maze` and let's each specify a different next location function.

I'll have a second round pass at this when I land in PDX, but wanted to get it up for :eyes: in the meantime.

```clojure
(defn generate-maze [maze]
(search-maze (merge maze {:next-location-fn random-unvisited-neighbor
:finished-fn (fn [_location _maze])})))

(defn solve-maze [maze]
(search-maze (merge maze {:next-location-fn random-reachable-neighbor
:finished-fn solved?})))
```