 
 (defn draw-phase!
   [state ctx]
+  ;;
+  ;; Always
   (.clearRect ctx 0 0 SCALE-W SCALE-H)
-  (doseq [object (vals @state)]
-    (when (satisfies? IDrawable object)
-      (draw! object ctx))))
+  (draw! (:background @state) ctx)
+  (draw! (:border @state) ctx)
+  ;;
+  ;; While playing and game-over
+  (when (contains? #{:playing :gameover} (:mode @state))
+    (draw! (:score-2 @state) ctx)
+    (draw! (:score-1 @state) ctx))
+  ;;
+  (when (contains? #{:game-start} (:mode @state))
+    (draw! (:game-start @state) ctx))
+  ;;
+  ;; While playing.
+  (when (contains? #{:playing} (:mode @state))
+    (draw! (:net @state) ctx)
+    (draw! (:paddle-1 @state) ctx)
+    (draw! (:paddle-2 @state) ctx)
+    (draw! (:ball @state) ctx)))
 
 (defn move-phase!
   [{:keys [ball] :as state}]

(def PLAYER_2_COLOR "peru")

(def SCORE_FONT "60px Helvetica")
(def SCORE_COLOR "#555")

(def BALL_COLOR "lime")

(def KEYBOARD
  {40 :down
   38 :up
   37 :paddle-1
   39 :paddle-2})

;;-----------------------------------------------------------------------------


    (when-let [event (<! ch)]
      (cond
        (contains? #{:up :down} event)
        (when-not (:pause? @state)
          (swap! state (fn [{id :current-paddle :as state}]
                         (assoc state id (control! (id state) event)))))

        (contains? #{:paddle-1 :paddle-2} event)
        (when-not (:pause? @state)
          (swap! state assoc :current-paddle event))

        (= :abort event)
        (swap! state #(if (:pause? %)
                        (assoc % :pause? false)
                        (assoc % :mode :game-start)))

        (= :space event)
        (swap! state #(if (= (:mode %) :game-start)
                        (merge % resets {:mode :playing})
                        (assoc % :pause? (not (:pause? %)))))

        :else
        (println "Unhandled event:" event))
