File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 14561456 unvisited (disj (set (keys paths)) start-loc)]
14571457 (if-let [loc (when-let [s (seq unvisited)] (rand-nth s))]
14581458 (let [walk (iterate (comp rand-nth paths) loc)
1459- steps (zipmap (take-while unvisited walk) (next walk))]<8>
1459+ steps (zipmap (take-while unvisited walk) (next walk))]
14601460 (recur (reduce disj walls (map set steps))
14611461 (reduce disj unvisited (keys steps))))
14621462 walls))))
15181518 deltas [[2 0 ] [1 1 ] [-1 1 ]]]
15191519 (set (for [v vertices d deltas f [+ -]
15201520 :let [w (vertices (map f v d))]
1521- :when w] #{v w}))
1521+ :when w] #{v w}))))
15221522
15231523(defn- hex-outer-walls
15241524 [w h]
15271527 deltas [[2 0 ] [1 1 ] [-1 1 ]]]
15281528 (set (for [v vertices d deltas f [+ -]
15291529 :let [w (map f v d)]
1530- :when (not (vertices w))] #{v (vec w)}))
1530+ :when (not (vertices w))] #{v (vec w)}))))
15311531
15321532(defn hex-draw
15331533 [w h maze]
You can’t perform that action at this time.
0 commit comments