                :align-items "center"}}
       (for [tile game-board
             :let [{:keys [::position ::value]} tile
-                  [x y] (position->coordinates position)]]
+                  {x ::x y ::y} (position->coordinates position)]]
         ^{:key (hash position)}
         [:div {:style {:position "absolute"
                        :background-color "orange"

(s/fdef move-direction
        :args (s/cat :board ::game-board :direction ::direction))

(defn move-direction
  [board direction]
  (->> (group-by-direction direction board)
       (vals)
       (map (partial sort-tiles-by-priority direction))
       (mapcat join-first)))

(defn update-state
  [state [event-type & params]]


(defn position->coordinates
  [position]
  (-> (update position ::x #(* tile-width %))
      (update ::y #(* tile-width %))))

(defn game-board
  []
