        (map move)
        (filter (comp not nil?))))
 
-(defn turn [{:keys [rotation-speed] :as ship} rot]
-  (assoc ship :rotation-speed (+ rotation-speed rot)))
-
-(defn accelerate [{:keys [acceleration] :as ship} acc]
-  (assoc ship :acceleration (+ acceleration acc)
-              :collidable? true))
-
-(defn toggle-shooting [ship do-shoot?]
-  (assoc ship :shooting? do-shoot?
-              :collidable? true))
+(defn set-rotation [{rotation :rotation :as ship} value activate?]
+  (let [rotation (if activate?
+                   (conj rotation value)
+                   (disj rotation value))]
+    (assoc ship :rotation rotation
+                :rotation-speed (reduce + rotation))))
 
 ; ----------------------------------------------------------
 ; mutable model

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

      :position       position
      :speed          speed


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

   :life                   ship-life
   :life-colors            [(Color. 255 0 0) (Color. 255 80 75) (Color. 250 160 75) (Color. 160 160 150)]
