Permalink
Browse files

fix drawing of the path from theseus to the minotaur (there was a bug…

… when the minotaur was hiding in a dead-end)
  • Loading branch information...
1 parent 7521bcf commit 9ffe8d4374791e577b6a4e2417efc544fecc8126 @cgrand cgrand committed May 19, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 ch03-collections-repl-interactions.clj
@@ -1691,11 +1691,12 @@ b
places (distinct (apply concat labyrinth))
theseus (rand-nth places)
minotaur (rand-nth places)
+ full-path #(conj (z/path %) (z/node %)) ; erratum
path (->> theseus
(ariadne-zip labyrinth)
(iterate z/next)
(filter #(= minotaur (first (z/node %))))
@cgrand

cgrand May 21, 2012

Contributor

I forgot to change first into second here

- first z/path rest)]
+ first full-path rest)] ; erratum: replaced z/path by full-path
(draw w h walls path))

0 comments on commit 9ffe8d4

Please sign in to comment.