                          (clear-message))} "Clear"]
    [:button {:on-click submit-score} "Enter"]])
 
-
-
-
 (defn play-page []
   [:div
    @message
    [:div
-    [:span "Player 1: " (points 0)]
-    [:br]
-    [:span "Player 2: " (points 1)]]
+    [:span "Player 1: " (points 0) " " (print-rounds 0) " avg: " (average 0)]
+    [:br]
+    [:span "Player 2: " (points 1) " " (print-rounds 1) " avg: " (average 1)]]
    [:div
     [:br]
     (str "Player " (+ 1 @current-player) " turn")

    (if-let [error (error-message new-score points)]
      (reset! message error)
      (record-score @current-player @score))))

(defn numpad []
  [:div

    (> score 180) "Score must be <= 180"
    (> score points) "You cannot score more points than remaining ones. Over?"))

(defn points [player-id]
  (- (:starting-score @game)
     (reduce + 0 (:rounds (get @game player-id)))) )

(defn record-score [player new-score]
  (swap! game #(update-in %1 [%2 :rounds] conj (js/parseInt %3))
