          shot-pos (vec+vec position (num*vec size dir-vec))
          shot-speed (vec+vec speed (num*vec shot-speed dir-vec))]
      (create-shot shot-pos direction shot-speed))))
+
+(defn create-asteroid
+  ([size pos]
+   (let [direction (rand (* 2 (Math/PI)))
+         speed (num*vec (rand asteroid-max-speed) (rotate-vec direction [0 1]))
+         rotation-speed (rand asteroid-max-rotation-speed)]
+     {:type           :asteroid
+
+      :size           size
+      :shape          [[-1.0 -1.0] [1.0 -1.0] [1.0 1.0] [-1.0 1.0]]
+      :color          (Color. 250 240 20)
+
+      :position       pos
+      :speed          speed
+      :acceleration   0
+
+      :direction      direction
+      :rotation-speed rotation-speed
+      }))
+  ([size]
+   (let [x (rand width)
+         y (rand height)]
+     (create-asteroid size [x y]))))
 
 (defn out-of-bounds? [{[x y] :position size :size}]
   (or

  (let [transformation (get-transformation-matrix ship point-size)
        polygon (polygon-to-screen shape transformation)
        cockpit-polygon (polygon-to-screen cockpit-shape transformation)]
    (draw-polygon g polygon color)
    (draw-polygon g cockpit-polygon cockpit-color)))

(defmethod paint :shot [g {:keys [shape color] :as shot}]
  (let [transformation (get-transformation-matrix shot point-size)
        polygon (polygon-to-screen shape transformation)]
    (draw-polygon g polygon color)))


(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 200)
(def asteroid-max-speed 1)
(def asteroid-max-rotation-speed 5)
(def turn-millis 20)
(def actions {
              (int \A) {:rotation (- turn-speed)}
              (int \D) {:rotation turn-speed}
