                        (filter (comp not nil?)))]
     [(assoc ship :shots shots) asteroids]))
 
-(def win? (constantly false))
-(def lose? (constantly false))
-
 (defn win? [asteroids]
   (empty? asteroids))
 

    ))

(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]

              (int \D) {:rotation turn-speed}
              (int \W) {:acceleration 1}
              (int \K) {:shoot true}
              (int \R) {:repair true}
              (int \1) {:set-level 1}
              (int \2) {:set-level 2}
              (int \3) {:set-level 3}
