Esempio n. 1
0
        public T UpdateRating <T>(IImmutableRatingHolder <T> ratingHolder, IRatingHolder opponent, Result result)
            where T : IImmutableRatingHolder <T>
        {
            var winProbability = GetWinProbability(ratingHolder.Rating, opponent.Rating);
            var newRating      = GetNewRating(ratingHolder.Rating, winProbability, result);

            return(ratingHolder.UpdateRating(newRating));
        }
Esempio n. 2
0
 bool IIdentifiable <IImmutableRatingHolder <Player> > .IdentifiesWith(IImmutableRatingHolder <Player> other)
 {
     return(IdentifiesWith(other.UpdateRating(other.Rating)));
 }
Esempio n. 3
0
 public bool IdentifiesWith(IImmutableRatingHolder <RatingHolder> other)
 {
     return(Identifier == other.UpdateRating(other.Rating).Identifier);
 }