     (will-mount [_]
       (let [chan-to-path-map (apply merge
                                     (for [team [:team1 :team2]
-                                          chan [:score]]
+                                          chan [:score :player1 :player2]]
                                       {(om/get-state owner [team chan]) [team chan]}))]
         (go-loop []
           (let [[v c] (alts! (keys chan-to-path-map))
                 path (get chan-to-path-map c)]
             (condp = (second path)
-              :score (handle-score-update report-match path v)
-              nil)
+              :score   (handle-score-update report-match path v)
+              (handle-player-update report-match path v))
             (recur)))))
 
     om/IRenderState

        (when other-score
          (update-score! report-match other other-score score))))))

(defn report-match-component [{:keys [players report-match] :as app} owner]
  (reify
    om/IInitState
    (init-state [_]
      (letfn [(team-chans-fact [] {:score (chan)})]
              {:team1 (team-chans-fact)
               :team2 (team-chans-fact)}))


                                           :placeholder "0"
                                           :input-props {:type "number"}}})]]))))

(defn render-team-player [report-match players team-path num change-ch]
  (let [player-selector (keyword (str "player" num))
        team            (get-in report-match team-path)]
    [:div.form-group
     [:label.control-label.col-lg-4 (str "Player " num)]
     [:div.controls.col-lg-8
      (render-players-select report-match players (conj team-path player-selector) change-ch)]]))

(defn team-selector [team-num]
  (keyword (str "team" team-num)))

(defn- render-team-controls [report-match players team-num {:keys [score player1 player2] :as chans}]
  (let [team          ((team-selector team-num) report-match)
        render-player (partial render-team-player report-match players [team-selector])]
    (debug "render team" team)
    [:div.col-lg-5.well.well-lg
     [:h2 (str "Team " team-num ":")]
     (render-player 1 player1)
     (render-player 2 player2)
     (om/build team-score-component
               (get report-match (team-selector team-num))
               {:opts {:score-ch score}})]))
