Skip to content

Commit

Permalink
Tournaments: Hide toolbox if opponents get DQed (#10769)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirain1700 authored Jan 4, 2025
1 parent 69eac38 commit eb935a4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/tournaments/generator-round-robin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ export class RoundRobin {
p2.score += 1;
p2.games += 1;
this.totalPendingMatches--;
if (this.matchesPerPlayer && p2.games === this.matchesPerPlayer) {
p2.sendRoom(`|tournament|update|{"isJoined":false}`);
p2.game.updatePlayer(p2, null);
}
}

for (const [row, challenges] of this.matches.entries()) {
Expand All @@ -127,6 +131,10 @@ export class RoundRobin {
p1.score += 1;
p1.games += 1;
this.totalPendingMatches--;
if (this.matchesPerPlayer && p1.games === this.matchesPerPlayer) {
p1.sendRoom(`|tournament|update|{"isJoined":false}`);
p1.game.updatePlayer(p1, null);
}
}

user.game.updatePlayer(user, null);
Expand Down

0 comments on commit eb935a4

Please sign in to comment.