Commits

Steve Losh committed 80438ed

Leftover.

Comments (0)

Files changed (1)

src/examples/followbot.clj

        (abs (- (:z from) (:z to))))))
 
 (defn- toward-single [from to]
-  (if (<= (abs (- from to)) 1)
+  (if (<= (abs (- from to)) 2)
     0
     (if (< from to) 1 -1)))
 
                      (distance-between bot %2))
                  entities))))
 
+
 ; Loops ----------------------------------------------------------------------------
 (defn follow [bot]
   (when (:loc @(:player bot))
     (let [players (find-other-players bot)
           closest (closest-entity bot players)]
       (when closest
-        (println (:name @(:player bot)) "following" (:name @closest))
-        (println (:loc @(:player bot)))
-        (println (:loc @closest))
         (let [{x :x z :z} (toward bot closest)]
           [(actions/move bot x 0 z)])))))