 
 (def app-state (atom {:text "Hello Chestnut!"
                       :hero {:move false
+                             :life 100
                              :position (hero-start-position grid-content)
                              :jump {:time nil :bottom nil}
                              }
-
+                      :game-over false
                       :grid grid-content}))
 
 (defn ceil [i]

       dom/div nil
       (om/build-all row grid)))))

(defn start-moving [e app]
  (condp = (aget e "keyCode")
    88 (om/update! app [:hero :move] :right)

      (reify
        om/IRender
        (render [_]
          (console-log (get-in app [:hero :life]))
          (if (>= 0 (get-in app [:hero :life]))
            (dom/h1 nil "GAME OVER")
            (dom/div #js {:className "grid" :tabIndex 0 :onKeyUp (fn [e] (stop-moving e app)) :onKeyDown (fn [e] (start-moving e app) (.preventDefault e))}
                   (om/build status-bar (:hero app))
                   (om/build hero app)
                   (om/build grid (:grid app))
                   )
            )
          )))
    app-state
    {:target (. js/document (getElementById "app"))}))
