From 7de13d88d26b1584b8216f990e8e5cf075a52aee Mon Sep 17 00:00:00 2001 From: Zach R Date: Sat, 17 Dec 2022 10:30:02 -0800 Subject: [PATCH] fix ranking calculations --- backend/classes/team.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/classes/team.ts b/backend/classes/team.ts index abcb603..29c7cf4 100644 --- a/backend/classes/team.ts +++ b/backend/classes/team.ts @@ -45,11 +45,14 @@ export default class Team implements TeamData { this._matches.forEach((match) => { switch (match.getMatchResult(this.id)) { case MatchResult.WIN: - rankingPoints += match.redScore + match.blueScore + rankingPoints += match.redScore + match.blueScore; + break; case MatchResult.LOSS: rankingPoints += match.getTeamScore(this.id) + break; case MatchResult.DRAW: rankingPoints += match.getTeamScore(this.id) + break; } }) return rankingPoints