mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
[mage.rating.plugin] Bug in Elo rating system (losers gained points instead of loosing them).
This commit is contained in:
parent
592ba955f0
commit
a913be4bc1
2 changed files with 3 additions and 3 deletions
Binary file not shown.
|
@ -94,9 +94,9 @@ public class ResultHandler {
|
||||||
if (loserRating == null)
|
if (loserRating == null)
|
||||||
loserRating = 1000;
|
loserRating = 1000;
|
||||||
Integer newWinnerRating = coundEloRating(winnerRating, loserRating, true);
|
Integer newWinnerRating = coundEloRating(winnerRating, loserRating, true);
|
||||||
Integer newLoserRating = coundEloRating(winnerRating, loserRating, false);
|
Integer newLoserRating = coundEloRating(loserRating, winnerRating, false);
|
||||||
log.info("Winner: " + winnerRating + " >> " + newWinnerRating);
|
log.info("Winner(" + winner + "): " + winnerRating + " >> " + newWinnerRating);
|
||||||
log.info("Loser: " + loserRating + " >> " + newLoserRating);
|
log.info("Loser(" + loser + "): " + loserRating + " >> " + newLoserRating);
|
||||||
ratings.put(winner, newWinnerRating);
|
ratings.put(winner, newWinnerRating);
|
||||||
ratings.put(loser, newLoserRating);
|
ratings.put(loser, newLoserRating);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue