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)); }
bool IIdentifiable <IImmutableRatingHolder <Player> > .IdentifiesWith(IImmutableRatingHolder <Player> other) { return(IdentifiesWith(other.UpdateRating(other.Rating))); }
public bool IdentifiesWith(IImmutableRatingHolder <RatingHolder> other) { return(Identifier == other.UpdateRating(other.Rating).Identifier); }