Ejemplo n.º 1
0
 public EloIndividualResult(EloPlayerIdentifier playerIdentifier, EloTeamIdentifier teamIdentifier, EloRating ratingBefore, EloRating ratingAfter)
 {
     PlayerIdentifier = playerIdentifier ?? throw new ArgumentNullException(nameof(playerIdentifier));
     TeamIdentifier   = teamIdentifier ?? throw new ArgumentNullException(nameof(teamIdentifier));
     RatingBefore     = ratingBefore;
     RatingAfter      = ratingAfter;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Calculates the expected score between two ratings.
 /// </summary>
 /// <param name="playerRating">Rating to calculate for.</param>
 /// <param name="opponentRating">Rating to calculate against.</param>
 /// <returns>Returns a float value between 0 and 1 representing the likelyhood of player winning another.</returns>
 public static float ExpectedScoreAgainst(this EloRating playerRating, int opponentRating)
 => ExpectedScore(playerRating, opponentRating);
Ejemplo n.º 3
0
 public EloPlayer(EloPlayerIdentifier identifier, EloRating rating)
 {
     Identifier = identifier ?? throw new ArgumentNullException(nameof(identifier));
     Rating     = rating ?? throw new ArgumentNullException(nameof(rating));
 }