     (when (= (:mode @state) :playing)
       (swap! state #(-> % move-phase! collision-phase! score-phase!)))
     (draw-phase! state ctx))
-  ;; (set! (.-innerHTML (by-id "debug"))
-  ;;       (apply str (for [[k v] @state]
-  ;;                    (str k ": " (pr-str v) "<br/>"))))
   (.requestAnimationFrame js/window (partial animate-loop! state ctx)))
 
 ;;-----------------------------------------------------------------------------


(defn- paddle-grab!
  [state e]
  (aset (.-style (by-id "canvas")) "cursor" "pointer")
  (let [x (.-clientX e)
        ww (/ (.-innerWidth js/window) 2)
        status (if (>= x ww) :paddle-2 :paddle-1)]

(defn resize!
  [state ctx]
  (let [w (- (.-innerWidth js/window) 40)
        h (- (int (/ (* w 9) 16)) 40)
        canvas (by-id "canvas")]
    (aset canvas "width" w)
    (aset canvas "height" h)
    (.scale ctx (/ w SCALE-W) (/ h SCALE-H))
    (draw-phase! state ctx)))

