 (ns kenny.core
   (:require [om.core :as om :include-macros true]
             [om.dom :as dom :include-macros true]
+            [cognitect.transit :as transit]
             [alandipert.storage-atom :refer [local-storage load-local-storage]]
             [cljs.core.async :as async :refer[<! chan sliding-buffer put! close! timeout]])
 

              bounce (get-in @app [:settings :bounce])
              red-trampete (get-in @app [:settings :red-trampete])
              blue-trampete (get-in @app [:settings :blue-trampete])
              new-hero (-> original-hero
                           grav
                           ((partial vertical-block original-hero))

    om/IRender
    (render [this]
      (dom/div #js {:className "status-bar"}
               (dom/span #js {:className "life"} (str "Time: " (ceil (first (get-in app [:settings :time])))))
               (dom/span #js {:className "life"} (str "Leben: " (get-in app [:hero :life]) "%"))
               (dom/button #js {:onClick (fn [e] (do
                                                   (om/transact! app [:hero] (fn [_] default-hero))
                                                   false))

                                }
                           "Neu Starten")
               (dom/button #js {:onClick (fn [e] (do
                                                   (om/transact! app :design-game (fn [bool] (not bool)))
                                                   false
                                                   )
                                           )}
                           (if (app :design-game)
                             "Züruck"
                             "Entwerfen"))




               )))
  )

