 (defn accelerate [{:keys [acceleration] :as ship} acc]
   (assoc ship :acceleration (+ acceleration acc)))
 
-(defn toggle-shooting [ship s]
-  (assoc ship :shooting s))
+(defn toggle-shooting [ship do-shoot?]
+  (assoc ship :shooting? do-shoot?))
 
 ; ----------------------------------------------------------
 ; mutable model

      (.repaint this))
    (keyPressed [e]
      (do-action! ship (actions (.getKeyCode e))))
    (getPreferredSize []
      (Dimension. (* (inc width) point-size)
                  (* (inc height) point-size)))
    (keyReleased [e]
      (do-action! ship (actions (.getKeyCode e)) -1))
    (keyTyped [e])))

(defn game []
  (let [ship (ref (create-ship))

   :cockpit-color          (Color. 0 0 80)

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

   :position               [(/ width 2) (/ height 2)]
