Skip to content

Instantly share code, notes, and snippets.

View quephird's full-sized avatar

danielle quephird

View GitHub Profile
(require ['clojure.string :as 'str])
(defn to-vec-of-ints [line]
(->> line
(map #(Integer/parseInt (str %)))
vec))
(defn to-grid [trees]
(->> trees
(map to-vec-of-ints)
(require ['clojure.string :as 'str])
(def head (atom [0 0]))
(def tail (atom [0 0]))
(def visited-tail-positions (atom #{[0 0]}))
(defn get-x [atom]
(get @atom 0))
(require ['clojure.string :as 'str])
(def cpu (atom {:x 1 :cycles 0}))
(def log (atom [1]))
(def crt (atom []))
(defn draw-pixel []
(let [x (get-in @cpu [:x])