 (def asteroid-jaggedness 0.6)
 (def asteroid-max-speed 0.6)
 (def asteroid-max-rotation-speed 4)
+(def debris-life-millis 3000)
 (def turn-millis 40)
 
 (def actions {

      :direction      direction
      :rotation-speed rotation-speed

      :collidable?    true
      }))
  ([size pos]
   (create-asteroid size pos [0 0]))

        [x y] (vec+vec speed position)
        position [(mod x width) (mod y height)]]
    (assoc asteroid :direction direction
                    :position position)))

(defmethod move :debris [{:keys [life-time direction rotation-speed position speed size] :as debris}]
  (if (<= life-time 0)
    nil
    (let [direction (+ direction (* rotation-speed turn-millis 0.001))
          [x y] (vec+vec speed position)
          position [(mod x width) (mod y height)]
          size (* size (- 1 (/ turn-millis life-time)))
          life-time (- life-time turn-millis)]
      (assoc debris :direction direction
                      :position position
                      :size size
                      :life-time life-time))))

(defn move-many [coll]
  (->> coll
       (map move)
       (filter (comp not nil?))))

; Accelerating shots - not used right now
#_(defmethod move :shot [{:keys [position speed direction acceleration] :as shot}]
