                       (s/maybe :collision-box)    {:width  s/Int
                                                    :height s/Int}
                       (s/maybe :render-info)      {:shape (s/enum :square)}
-                      (s/maybe :human-controlled) {:indended-move-direction IntendedMoveDirection
-                                                   :intended-fire-direction s/Any}})
+                      (s/maybe :human-controlled) {:indended-move-direction IntendedDirection
+                                                   :intended-fire-direction IntendedDirection}})
 
 (def player {:id               1
              :position         {:x 10
                                 :y 10}
              :collision-box    {:width 50 :height 50}
              :render-info      {:shape :square}
-             :human-controlled {:intended-move-direction #{}}
+             :human-controlled {:intended-move-direction #{}
+                                :intended-fire-direction #{}}
              })
+
+(sm/defschema GameState {:entities [Entity]})
 
 ; TODO :mode? :active-level?
 (def game-state (atom {:entities [player]}))

    (let [msg (<! event-chan)]
      (js/console.log (clj->js msg))
      (case (msg :type)
        ; TODO function for getting the player
        :move-key-down (swap! state update-in [:entities 0 :human-controlled :intended-move-direction] conj (msg :direction))
        :move-key-up (swap! state update-in [:entities 0 :human-controlled :intended-move-direction] disj (msg :direction))
        )
      (js/console.log (clj->js (get-in @state [:entities 0 :human-controlled :intended-move-direction])))
      (recur))))

(defn ^:export main []

              (put! event-chan {:type      event-type
                                :direction (key-mappings code)}))))))))

(sm/defn update-player [state :- GameState & args]
  (apply update-in
         state
         (concat [:entities 0] (first args))
         (rest args)))

(defn handle-events [state event-chan]
  (listen-to-keyboard-inputs event-chan)

