 (def ship-rotation-speed 4)
 (def shot-size (/ ship-size 10))
 (def shot-speed 2.5)
-(def shot-millis 200)
+(def shot-millis 300)
+(def missile-size (/ ship-size 3))
+(def missile-speed 1)
+(def missile-acceleration 1)
+(def missile-millis 10000)
 (def asteroids-start-number 1)
 (def asteroid-start-size 5)
 (def asteroid-min-size 1.2)
-(def asteroid-size-variance 0.3)
+(def asteroid-size-variance 0.2)
 (def asteroid-jaggedness 0.7)
 (def asteroid-max-speed 0.6)
 (def asteroid-max-rotation-speed 4)
 (def fragment-number 3)
+(def crit-fragment-number 30)
 (def fragment-size-reduction (Math/sqrt fragment-number))
+(def crit-fragment-size-reduction (Math/sqrt crit-fragment-number))
 (def debris-life-millis 3000)
 (def turn-millis 40)
 

; Actions
; ----------------------------------------------------------------------

(defn shoot [{:keys [shooting? shots millis-since-last-shot] :as ship}]
  (let [millis-since-last-shot (+ turn-millis millis-since-last-shot)
        shoots? (and shooting? (>= millis-since-last-shot shot-millis))
        shots (if shoots? (conj shots (create-shot ship)) shots)]
    (when shoots? (play-sound "shot"))
    (assoc ship :millis-since-last-shot (if shoots? 0 millis-since-last-shot)
                :shots shots)))

(defn basic-move

      (ref-set asteroids asteroids*))))

(defn do-action!
  ([ship {:keys [acceleration rotation shoot fire-missile] :as action} activate?]
   (when acceleration (dosync (alter ship assoc :acceleration (if activate? acceleration 0) :collidable? true)))
   (when rotation (dosync (alter ship set-rotation rotation activate?)))
   (when shoot (dosync (alter ship assoc :shooting? activate? :collidable? true)))
   (when fire-missile (dosync (alter ship assoc :firing? activate? :collidable? true))))
  ([ship action]
   (do-action! ship action true)))

