Created
February 5, 2010 23:09
-
-
Save duncanmak/296362 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn calculate-offset [value file section row column direction] | |
(let [tile (get-tile section row column)] | |
(cond | |
(out-of-bounds? row column) [-1 -1] | |
(not (false? tile)) (really-calculate-offset file (:file tile) direction) | |
:else | |
(do (Thread/sleep 60000) | |
(recur value file section row column direction))))) | |
(defn make-agent [section row column action direction] | |
(send-off (agent (str "Looking for " [section row column])) action row column direction)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment