   nil)
 
 ;(def slide! (main 5))
-

       (proxy [KeyAdapter] []
         (keyPressed [#^KeyEvent e]
           (condp = (.getKeyCode e)
             KeyEvent/VK_LEFT  (slide! :left)
             KeyEvent/VK_RIGHT (slide! :right)
             KeyEvent/VK_UP    (slide! :up)
             KeyEvent/VK_DOWN  (slide! :down)
             KeyEvent/VK_Q     (.dispose #^JFrame frame)
             KeyEvent/VK_R     (do (shuffle-board! dim) (.repaint panel))
             KeyEvent/VK_S     (apply slide! (solve-next @board))
             true)))))
    (doto frame (.setContentPane panel) .pack .show)
    slide!))

(defn -main [& [num]]
  (if num (start-gui (Integer/parseInt num))

(ns tile-game.core
  (:use [tile-game board])
  (:require [clojure.core.async :as a])
  (:import [javax.swing JFrame JPanel]
           [java.awt Color Graphics Graphics2D Dimension Font]
           [java.awt.event KeyAdapter KeyEvent]))
