Byes count as games played.

This commit is contained in:
marcins78@gmail.com
2013-01-05 20:05:40 +00:00
parent d5253f7665
commit 1aea57710d

View File

@@ -39,8 +39,12 @@ public class StandingsProducer {
int points = playerWinCounts.get(playerName).intValue() * pointsForWin + playerLossCounts.get(playerName).intValue() * pointsForLoss;
int gamesPlayed = playerWinCounts.get(playerName).intValue() + playerLossCounts.get(playerName).intValue();
if (playersWithByes.containsKey(playerName))
points += pointsForWin * playersWithByes.get(playerName);
if (playersWithByes.containsKey(playerName)) {
int byesCount = playersWithByes.get(playerName);
points += pointsForWin * byesCount;
gamesPlayed += byesCount;
}
PlayerStanding standing = new PlayerStanding(playerName, points, gamesPlayed);
List<String> opponents = playerOpponents.get(playerName);