 (s/fdef move-direction
         :args (s/cat :board ::game-board :direction ::direction))
 
+(defn shift-in-direction
+  [direction row]
+  (case
+      ::up (map-indexed (fn [idx itm] (update itm ::position #())))
+      ::down
+      ::left
+      ::right
+      ))
+
 (defn move-direction
   [board direction]
   (->> (group-by-direction direction board)
        (vals)
        (map (partial sort-tiles-by-priority direction))
-       (mapcat join-first)))
+       (mapcat join-first)
+       #_(mapcat (partial shift-in-direction direction))
+       ))
 
 (defn update-state
   [state [event-type & params]]

(defn tile-comparator
  [direction]
  (fn [tile1 tile2]
    (let [[x1 y1] (::position tile1)
          [x2 y2] (::position tile2)]
      (case direction
        ::up (compare y1 y2)
        ::down (compare y2 y1)


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

(defn game-board
  []
