Function skill_rating::elo::series [] [src]

pub fn series(r_a: EloRating, games: &[(EloRating, f32)], k_factor: u32) -> EloRating

Calculates the updated elo of a player, after a series of games. This might be used to calculate the rating of a player after a tournement.

Example

Update the rating of John after competing in a chess tournement.

use skill_rating::elo;
 
let john = 1700;
 
// An array containing the results of johns games in the tournement
let games = [(1600, elo::WIN), (1800, elo::DRAW), (2000, elo::LOSS)];

let john = elo::series(john, &games, 32);