       (swap! state update :score + 10)
       (swap! state assoc-in [:obstacles 0 :scored] true))))
 
-(defn game-loop [state end]
+(defn game-loop [state end max-score]
   (let [{:keys [cur-time]} @state
         next-time (js/performance.now)
         delta (- next-time cur-time)]

(defonce app-state
  (r/atom {:data nil
           :game nil
           :view [:init]}))

(def initial-state

            [mrunner.routes :as routes]))


;; Localstorage methods
(defn set-item!
  "Set `key' in browser's localStorage to `val`."
  [key val]
  (.setItem (.-localStorage js/window) key val))

(defn get-item
  "Returns value of `key' from browser's localStorage."
  [key]
  (.getItem (.-localStorage js/window) key))


;;
;;  Application state
;;  =================
