     (doto
         (proxy [JComponent] []
             (paint [g] (dosync (game-render (deref game-state) g))))
-        (.setPreferredSize (new Dimension 640 480))
+        (.setPreferredSize (new Dimension width height))
         (.setDoubleBuffered true)
         (.setFocusable true)))
 

; :mode=clojure:

(import
    '(java.awt Color Dimension Polygon RenderingHints)
    '(javax.swing JComponent JFrame JLabel Timer)
    '(java.awt.event ActionListener KeyAdapter)
)

(defn do-mod [coll func v]
    (dosync (alter coll (fn [x] (apply func [x v])))))

        (.setColor g (Color/WHITE))
        (let [old-transform (.getTransform g)]
            (.translate g (:x player) (:y player))
            (.rotate g (:a player))
            (.fill g (player-shape))
            (.setTransform g old-transform))))

