 (def debris-life-millis 3000)
 
 (def ammunition-types {:projectile {:size         (/ ship-size 10)
+                                    :shape        [[-1.0 -5.0] [1.0 -5.0] [0.0 1.0]]
+                                    :color        (Color. 250 50 10)
                                     :speed        2.5
                                     :acceleration 0
                                     :damage       3
                                     :cooldown     300}
                        :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)
                                     :speed        0
                                     :acceleration 3
                                     :damage       30


(declare fill-polygon draw-polygon fill-circle draw-circle)

(defn create-ship []
  {:type                      :ship

   :size                      ship-size
   :shape                     [[-0.143 1.0] [0.143 1.0] [0.429 0.429] [1.0 0.143] [1.0 -1.0] [0.429 -0.714]
                               [0.143 -1.0] [-0.143 -1.0] [-0.429 -0.714] [-1.0 -1.0] [-1.0 0.143] [-0.429 0.429]]
   :color                     (Color. 160 160 150)
   :paint-method              fill-polygon

   :cockpit-shape             [[-0.143 0.714] [0.143 0.714] [0.286 -0.143] [-0.286 -0.143]]
   :cockpit-color             (Color. 0 0 80)

   :shots                     []
   :shooting?                 false
   :millis-since-last-shot    0
   :millis-since-last-missile 0

   :position                  [(/ width 2) (/ height 2)]
   :speed                     [0 0]
   :acceleration              0

   :direction                 0
   :rotation-speed            0
   :rotation                  #{}

   :life                      ship-life
   :life-colors               {0 (Color. 255 0 0)
                               1 (Color. 255 80 75)
                               2 (Color. 250 160 75)
                               3 (Color. 160 160 150)}
   :collidable?               false                         ; is set to ship-damage at first movement / shooting
   })

(defn create-circle

              (int \A) {:rotation (- ship-rotation-speed)}
              (int \D) {:rotation ship-rotation-speed}
              (int \W) {:acceleration ship-acceleration}
              (int \J) {:fire-weapon :launcher}
              (int \K) {:fire-weapon :machinegun}})

; END: constants

