Skip to content

Commit

Permalink
update gamePoints calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
giaunguyen2176 committed Jun 10, 2024
1 parent d3bc399 commit 34539c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Tournament.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export class Tournament {
return matchA.round - matchB.round;
});
player.player.matches.filter(match => this.matches.find(m => m.id === match.id && m.active === false)).forEach(match => {
player.gamePoints += match.bye ? this.scoring.bye : (this.scoring.win * match.win) + (this.scoring.loss * match.loss) + (this.scoring.draw * match.draw);
player.gamePoints += ((match.bye ? this.scoring.bye : this.scoring.win) * match.win) + (this.scoring.loss * match.loss) + (this.scoring.draw * match.draw);
player.games += match.win + match.loss + match.draw;
player.matchPoints += match.bye ? this.scoring.bye : match.win > match.loss ? this.scoring.win : match.loss > match.win ? this.scoring.loss : this.scoring.draw;
player.tiebreaks.cumulative += player.matchPoints;
Expand Down

0 comments on commit 34539c9

Please sign in to comment.