                                           :type "date"
                                           :value formated-date}]]]]))
 
-(defn other-team [this-team]
-  (let [difference (disj #{:team1 :team2} this-team)]
-    (when (= 1 (count difference))
-      (first difference))))
-
 (defn valid-score? [this other]
   (:team1score (vm/validate-scores [this other])))
 

      (letfn [(team-chans-fact [] {:score (chan)
                                   :player1 (chan)
                                   :player2 (chan)})]
              {:team1 (team-chans-fact)
               :team2 (team-chans-fact)}))

    om/IWillMount
    (will-mount [_]

        (go-loop []
          (let [[v c] (alts! (keys chan-to-path-map))
                path (get chan-to-path-map c)]
            (condp some (-> path)
              #{:score}   (handle-score-update report-match path v)
              #{:player1
                :player2} (handle-player-update report-match path v)
              nil)
            (recur)))))

    om/IRenderState
    (render-state [_ {:keys [team1 team2]}]
      (let [_  (debug (map (fn [p]  (str "'" (:name p) "'")) (selected-players (:team1 report-match)
                                                                              (:team2 report-match))))
            __ (debug (map (fn [kw] (get-in report-match [kw :score])) [:team1 :team2]))
            render-team (partial render-team-controls app)]
        (html
