From 2cb8c5e8b3af4a9bdb97e7953a30d80a945c0352 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sun, 19 Jul 2020 19:37:48 +0200 Subject: [PATCH] Fix ELO Calculation Signed-off-by: Lixfel --- .../src/de/steamwar/fightsystem/utils/FightStatistics.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/utils/FightStatistics.java b/FightSystem_Main/src/de/steamwar/fightsystem/utils/FightStatistics.java index 577224e..8ccfa4f 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/utils/FightStatistics.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/utils/FightStatistics.java @@ -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);