21 lines
657 B
Rust
21 lines
657 B
Rust
use pickleball_elo::glicko::{GlickoRating, Glicko2Calculator};
|
|
|
|
fn main() {
|
|
println!("Testing Glicko-2 calculator...");
|
|
|
|
let calc = Glicko2Calculator::new();
|
|
let player1 = GlickoRating::new_player();
|
|
let player2 = GlickoRating::new_player();
|
|
|
|
println!("Player 1 before: rating={}, rd={}, vol={}",
|
|
player1.rating, player1.rd, player1.volatility);
|
|
|
|
println!("Calculating update...");
|
|
let updated = calc.update_rating(&player1, &[(player2, 1.0)]);
|
|
|
|
println!("Player 1 after: rating={}, rd={}, vol={}",
|
|
updated.rating, updated.rd, updated.volatility);
|
|
|
|
println!("✅ Test complete!");
|
|
}
|