                          (paint [g]
                            (doseq [x (range dim) y (range dim)]
                              (render-tile g @board [x y]))))
-        slide!
-        (fn [& moves]
-          (prn :slide! moves)
-          (send (agent moves)
-                (fn [moves]
-                  (doseq [piece moves]
-                    (dosync (alter board slide piece))
-                    (.repaint panel)
-                    (Thread/sleep 150)))))
+        render (a/chan)
         shuffle-board!
         (fn [dim] (dosync (ref-set board
                                    (create-board dim :shuffle))))]


(def board (ref (create-board 2)))

(defn start-gui [dim]
  (let [size (* dim scale)
        #^JFrame frame (JFrame.)

  nil)

;(def slide! (main 5))
