0.1.0 |
|
---|
#12 in #elo
4KB
52 lines
rust-elo
Rust crate for calculating players ratings based on elo ranking system.
Installation
[dependencies]
rust-elo = "0.1.0"
Example usage
use crate::elo::{EloRank, MatchWinner};
fn main() {
let elo = EloRank { k: 32 };
let player_a = 1200.0;
let player_b = 1400.0;
let winner = MatchWinner::PlayerA;
let (player_a_new_ranking, player_b_new_ranking) = elo.calculate(player_a, player_b, winner);
}