doesn't like override.

This commit is contained in:
2014-09-03 15:02:35 -07:00
parent fea9fd862a
commit 9d7347fd7e

View File

@@ -30,7 +30,7 @@
(< -1 y (count my-map)))) candidates))))
(defn resolve [came-from play-loc target-loc]
(defn resolve-path [came-from play-loc target-loc]
(if (nil? (came-from target-loc))
nil
(loop [path []
@@ -59,7 +59,7 @@
(let [current-loc (first (keys fronteir))]
(if (or (empty? fronteir)
(= current-loc target-loc))
(resolve came-from play-loc target-loc)
(resolve-path came-from play-loc target-loc)
(let [neighbors (neighbors current-loc my-map)
[cost-so-far came-from fronteir] (reduce (fn [[cost-so-far came-from fronteir] neighbor]
(let [new-cost (+ (cost-so-far current-loc) (get-in my-map (reverse neighbor)))]