SteamWar/FightSystem
Archiviert
13
1

Fix ELO Calculation

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2020-07-19 19:37:48 +02:00
Ursprung b2a9a4ed64
Commit 2cb8c5e8b3

Datei anzeigen

@ -52,8 +52,8 @@ public class FightStatistics {
if(Config.Ranked && !Config.event()){
int blueElo = Elo.getElo(blueLeader.getId(), gameMode);
int redElo = Elo.getElo(redLeader.getId(), gameMode);
double blueWinExpectation = 1 / (1 + Math.pow(10, (blueElo - redElo) / 400f));
double redWinExpectation = 1 / (1 + Math.pow(10, (redElo - blueElo) / 400f));
double redWinExpectation = 1 / (1 + Math.pow(10, (blueElo - redElo) / 400f));
double blueWinExpectation = 1 / (1 + Math.pow(10, (redElo - blueElo) / 400f));
int newBlueElo = (int) Math.round(blueElo + K * (blueResult - blueWinExpectation));
int newRedElo = (int) Math.round(redElo + K * (1 - blueResult - redWinExpectation));
Elo.setElo(blueLeader.getId(), gameMode, newBlueElo);