 
 (defn gravity [app]
   (let [dy (get-in @app [:hero :position :bottom])
-        t (get-in @app [:hero :jump-time])
+        t (get-in @app [:hero :jump])
         dt (/ (- (.getTime (js/Date.)) t) 1000)
         vforce (* v dt)
         gforce (/ (* g dt dt) 2)

    (will-mount [_]
      (js/setInterval
       (fn []
         (when (get-in @app [:hero :jump-time])
           (let [height (gravity app)]
             (when (= height 70)
               (om/update! app [:hero :jump-time] nil))
             (om/update! app [:hero :position :bottom] height)
             ))



         ) (/ 1000 60)))
    om/IRenderState
    (render-state [this state]

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

(defn start-moving [e app]
  (condp = (aget e "keyCode")
    88 (om/update! app [:hero :move] :left)
    90 (om/update! app [:hero :move] :right)
    32 (when-not (get-in @app [:hero :jump])
         (om/update! app [:hero :jump] (.getTime (js/Date.))))
    nil
    )
  )

(defn stop-moving [e app]
  (condp = (aget e "keyCode")
    88 (om/update! app [:hero :move] false)
    90 (om/update! app [:hero :move] false)
    nil
    )
  )

(defn main []
