 
 
 (defn test-tile [nx ny]
-  (add-to-available-tiles at [nx ny 0 0 0 0]))
+  (add-to-available-tiles at 0 [nx ny 0 0 0]))
 
 (defn test-tiles [nx ny]
   (doseq [i (range nx) j (range ny)]

    (def at available-tiles)
    (def ss screen-state)
    (def f frame)
    (.add (.getContentPane frame) canvas)
    (setup-fullscreen frame)
    (handle-drags canvas screen-state)

                           RenderingHints/VALUE_ANTIALIAS_OFF)))))
       
(defn paint-tiles [^Graphics2D g available-tiles zoom]
  (doseq [[[nx ny nz nt nc] tagged-image] (get available-tiles zoom)]
    (let [[x y] (tile-to-pixels [nx ny] [512 512] zoom)]
      (when tagged-image
        (.drawImage g (awt-image tagged-image)
                    x y nil)))))

(defn paint-screen [canvas screen-state available-tiles]
  (let [g (.getGraphics canvas)
        original-transform (.getTransform g)]
    (doto g
      (.translate (:x @screen-state) (:y @screen-state))
      enable-anti-aliasing
      (paint-tiles @available-tiles (:zoom @screen-state))
      (.setTransform original-transform)
      (.setColor (Color. 0x00A08F))
      (.fillOval (- (+ (/ (:width @screen-state) 2)
                       (:x @screen-state))
