       :size           (vary asteroid-size-variance size)
       :shape          shape
       :color          (Color. 250 240 (if debris? 150 20))
+      :paint-method draw-polygon
 
       :position       position
       :speed          speed

    ))

(defn collide? [{size1 :size [x1 y1] :position} {size2 :size [x2 y2] :position}]
  (let [distance (fn [a b max]
                   (let [d (Math/abs (- a b))]
                     (if (< d (/ max 2)) d (- max d))))
        x (distance x1 x2 width)
        y (distance y1 y2 height)
        size (+ size1 size2)
        square #(* % %)]
    (<= (+ (square x) (square y)) (square size))))

(defmulti check-collision
          (fn [obj1 obj2]

      (create-asteroids 3 fragment-size position speed)
      asteroid)))

(defmethod handle-collision :other [{hit? :hit? :as object}]
  (if hit?
    nil
    object))

(defn resolve-all-collision [{shots :shots :as ship} asteroids]
  (let [[ship asteroids] (check-collision ship asteroids)
