   (if (or (hit? ball paddle-1 :right)
           (hit? ball paddle-2 :left))
     (let [{:keys [vx vy]} ball
+          delta (rand-nth [0.3 0.5 0.7])
           vxf (if (< vx 0) dec inc)
-          vyf (if (< vy 0) dec inc)]
+          vyf (if (< vy 0) #(- % delta) #(+ % delta))]
       (assoc state :ball (assoc ball :vx (* -1 (vxf vx)) :vy (vyf vy))))
     state))
 

        ctx (.getContext canvas "2d")
        events (chan 1 key-stroke-stream)]
    (event-loop! state events)
    (listen! js/window   "resize"  #(resize! state ctx))
    (listen! js/document "keydown" #(put! events (.-keyCode %)))
    (listen! canvas      "mousemove" #(paddle-move! state %))
    (listen! canvas      "mousedown" #(paddle-grab! state %))
    (listen! canvas      "mouseup" #(paddle-release! state %))
    (resize! state ctx)
    (animate-loop! state ctx)))



(defn draw-phase!
  [state ctx]
  (.clearRect ctx 0 0 SCALE-W SCALE-H)
  (draw! (:background @state) ctx)
  (when (contains? #{:playing :game-over} (:mode @state))
    (draw! (:score-2 @state) ctx)
    (draw! (:score-1 @state) ctx))
  (when (contains? #{:game-over} (:mode @state))
    (draw! (:game-over @state) ctx))
  (when (contains? #{:game-start} (:mode @state))
    (draw! (:game-start @state) ctx))
  (when (contains? #{:playing} (:mode @state))
    (draw! (:net @state) ctx)
    (draw! (:paddle-1 @state) ctx)
