                                     :speed        2.5
                                     :acceleration 0
                                     :damage       3
-                                    :cooldown     300}
+                                    :cooldown     300
+                                    :explosion    {:size      3
+                                                   :color     (Color. 220 180 180)
+                                                   :life-time 400}}
                        :missile    {:size         (/ ship-size 3)
-                                    :shape          [[0.0 1.0] [0.5 -1.0] [0.5 -3.5] [1.0 -4.5] [0.5 -4.5] [0.25 -4.25]
-                                                     [-0.25 -4.25] [-0.5 -4.5] [-1.0 -4.5] [-0.5 -3.5] [-0.5 -1.0]]
-                                    :color          (Color. 10 50 250)
+                                    :shape        [[0.0 1.0] [0.5 -1.0] [0.5 -3.5] [1.0 -4.5] [0.5 -4.5] [0.25 -4.25]
+                                                   [-0.25 -4.25] [-0.5 -4.5] [-1.0 -4.5] [-0.5 -3.5] [-0.5 -1.0]]
+                                    :color        (Color. 10 50 250)
                                     :speed        0
                                     :acceleration 3
                                     :damage       30
-                                    :cooldown     10000}})
+                                    :cooldown     10000
+                                    :explosion    {:size      30
+                                                   :color     (Color. 230 230 250)
+                                                   :life-time 200}}})
 
 (def actions {
               (int \A) {:rotation (- ship-rotation-speed)}

   :collidable?    false                                    ; is set to ship-damage at first movement / shooting
   })

(defn create-circle
  ([pos speed]
   {:type           :projectile

    :size           (* 0.5 ship-size)
    :shape          [[-1 -1] [1 1]]

    :color          (Color. 10 200 220)
    :paint-method   fill-circle

    :position       pos
    :speed          speed
    :acceleration   0

    :direction      0
    :rotation-speed 0

    :collidable?    'whatever
    }))

(defn create-shot [ammunition-type {:keys [position size direction speed] :as ship}]
  (let [dir-vec (m/rotate-vec direction [0 1])
        position (m/vec+vec position (m/num*vec size dir-vec))

        (recur (rest coll1) coll2 (conj coll1-result obj1))))))

(defmulti handle-damage (fn [{type :type}]
                          (cond
                            (#{:projectile :missile} type) :shot
                            (#{:ship :asteroid} type) type
                            :else :other)))

(defmethod handle-damage :ship [{:keys [damage-taken life] :as ship}]
  (when damage-taken (play-sound (if (<= life damage-taken) "ship-destroyed" "ship-hit")))
