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


(defn start-moving [e app]
  (condp = (aget e "keyCode")
    88 (om/update! app [:hero :dx] 5)
    90 (om/update! app [:hero :dx] -5)
    32 (when (and (on-solid-ground? (get-in @app [:hero :position])) (nil? (get-in @app [:hero :jump :start])))
         (om/update! app [:hero :jump :start] (.getTime (js/Date.)))
         (om/update! app [:hero :jump :bottom] (get-in @app [:hero :position :bottom])))
    nil
    )
  )

        (render [_]
          (if (>= 0 (get-in app [:hero :life]))
            (dom/h1 nil "GAME OVER")
            (dom/div nil
                     (om/build status-bar (:hero app))
                     (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 hero app)
                              (om/build grid (:grid app))
                              ))
            )
          )))
    app-state
