         (.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))))
 


(defn default-state [] {
    :time (now)
    :player { :x 100.0 :y 100.0 :xv 10.0 :yv 5.0 } } )

(defn player-step [player time-step]
    (assoc player
        :x (+ (:x player) (* (:xv player) time-step))
        :y (+ (:y player) (* (:yv player) time-step))))

(defn game-step [state keys-pressed]
    (let [new-time (now) time-step (- new-time (:time state))]
        (assoc state
            :time new-time
            :player (player-step (:player state) time-step))))

(defn create-game []
    (let [

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

