diff --git a/src/functions.php b/src/functions.php index e7d656f..ff5528d 100644 --- a/src/functions.php +++ b/src/functions.php @@ -202,7 +202,7 @@ function ELO_get_new_ranks($elo1,$elo2,$score){ //(see https://blog.antoine-augusti.fr/2012/06/maths-et-code-le-classement-elo/) return array( $elo1 + ELO_get_k($elo1) * ($score - (1/ (1 + pow(10,(($elo2 - $elo1) / 400))))), - $elo2 + ELO_get_k($elo2) * ($score - (1/ (1 + pow(10,(($elo1 - $elo2) / 400))))) + $elo2 + ELO_get_k($elo2) * (1 - $score - (1/ (1 + pow(10,(($elo1 - $elo2) / 400))))) ); } function save_battle($game,$bot1,$bot2,$resultat){