Skip to content

Instantly share code, notes, and snippets.

@duncanmak
Created February 4, 2010 00:29
Show Gist options
  • Save duncanmak/294229 to your computer and use it in GitHub Desktop.
Save duncanmak/294229 to your computer and use it in GitHub Desktop.
(defn calculate-offset [value file s r c]
(println "Calculating offset for" (.getName file) "at" [s r c])
(condp #(%1 %2)
(or (neg? s) (neg? r) (neg? c)) [-1 -1]
(tile-exists? s r c) :>> #(really-calculate-offset file (:file %))
(do (Thread/sleep 60000)
(recur value file s r c))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment