                            RenderingHints/VALUE_ANTIALIAS_ON
                            RenderingHints/VALUE_ANTIALIAS_OFF)))))
        
-(defn paint-tiles [^Graphics2D g visible-tiles]
-  (doseq [[[nx ny nz nt nc nzoom] tagged-image] visible-tiles]
+(defn paint-tiles [^Graphics2D g available-tiles]
+  (doseq [[[nx ny nz nt nc nzoom] tagged-image] available-tiles]
     (let [[x y] (tile-to-pixels [nx ny] [512 512])]
       (when tagged-image
         (.drawImage g (awt-image tagged-image)
                     x y nil)))))
 
-(defn paint-screen [canvas screen-state visible-tiles]
+(defn paint-screen [canvas screen-state available-tiles]
   (let [g (.getGraphics canvas)]
     (doto g
       (.translate (:x @screen-state) (:y @screen-state))
       enable-anti-aliasing
-      (paint-tiles @visible-tiles)
+      (paint-tiles @available-tiles)
       (.translate (- (:x @screen-state)) (- (:y @screen-state)))
       (.setColor (Color. 0x00A08F))
       (.fillOval (- (+ (/ (:width @screen-state) 2)

    (fn [_ _ _ _]
      (.repaint canvas))))

(defn main-canvas [screen-state visible-tiles]
  (doto
    (proxy [Canvas] []
      (paint [^Graphics g] (paint-screen this screen-state visible-tiles)))
    (.setBackground Color/BLACK)))
    
(defn main-frame []

(defn add-tile [tile-map indices]
  (assoc tile-map indices (get-tile indices)))

(defn add-to-available-tiles [available-tiles indices]
  (send-off available-tiles add-tile indices))

;; gui utilities

