0.1.0 |
|
---|
在 #elo 中排名第11
4KB
52 代码行
rust-elo
基于Elo排名系统的玩家评级计算的Rust包。
安装
[dependencies]
rust-elo = "0.1.0"
示例用法
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);
}