 (def height 100)
 (def point-size 8)
 (def ship-size 1.5)
+(def turn-speed 4)
 (def shot-size (/ ship-size 10))
 (def shot-speed 1.5)
-(def shot-millis 250)
+(def shot-millis 200)
+(def asteroid-max-speed 1)
+(def asteroid-max-rotation-speed 5)
 (def turn-millis 20)
-(def turn-speed 4)
 (def actions {
               (int \A) {:rotation (- turn-speed)}
               (int \D) {:rotation turn-speed}

; ----------------------------------------------------------

(defn draw-polygon [graphics polygon color]
  (doto graphics
    (.setColor color)
    (.fillPolygon (let [jpolygon (new Polygon)]
                    (doseq [[x y] polygon] (. jpolygon (addPoint x y)))
                    jpolygon)))
  nil)

(defmulti paint (fn [_ object] (:type object)))

; ----------------------------------------------------------
; mutable model
; ----------------------------------------------------------
(defn update-positions! [ship asteroid]
  (dosync
    (alter ship shoot)
    (alter ship move)
    (alter asteroid move))
  nil)

(defn do-action!
