           {score2 :score} score-2
           p1? (> x SCALE-W)
           p2? (< x 0)
-          s1 (assoc score-1 :score (if p1? (inc score1) score1))
-          s2 (assoc score-2 :score (if p2? (inc score2) score2))
+          score1 (if p1? (inc score1) score1)
+          score2 (if p2? (inc score2) score2)
+          s1 (assoc score-1 :score score1)
+          s2 (assoc score-2 :score score2)
+          mode (if (or (>= score1 WIN_SCORE)
+                       (>= score2 WIN_SCORE))
+                 :game-over
+                 (:mode state))
           ball (cond
                  p2? (assoc ball :x (- SCALE-W 25) :y (/ SCALE-H 2))
                  p1? (assoc ball :x 25 :y (/ SCALE-H 2))
                  :else ball)]
-      (assoc state :score-1 s1 :score-2 s2 :ball ball))))
+      (assoc state :score-1 s1 :score-2 s2 :ball ball :mode mode))))
 
 (defn animate-loop!
   [state ctx]

  (draw! (:background @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))

                        (assoc % :mode :game-start)))

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

        :else
