   {:blue "#127496"})
 
 (defn log-state
-  [{:keys [surface-width surface-height surface player]}]
+  [{:keys [player]}]
   (let [[player-x player-y] player]
-    (.log js/console "surface width:" surface-width
-          "surface height:" surface-height)
-    (.log js/console "surface:" surface)
     (.log js/console "player x" player-x "player y" player-y)))
 
 (defn draw-square

(def game-x-cells (pixels->cell game-width))
(def game-y-cells (pixels->cell game-height))

(defn surface-element
  []
  (dom/getElement "surface"))

(def keycode->key
  {kcs/SPACE :space

                  :marginTop (px top)
                  :marginLeft (px left)})))

(defn setup-events
  [state]
  (let [timer (goog.Timer. 200)]
    (events/listen timer goog.Timer/TICK (partial check-game state))
    (events/listen js/window event-type/RESIZE resize)
    (events/listen js/window event-type/KEYDOWN (partial keydown state))
    (.start timer)))

(defn main
  []
  (let [state (atom (initial-state))]
    (setup-events state)
    (resize)
    (render-world state)))

(main)
