From 056809b3efca1a96dfca7b5567b583d58cb4f37b Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 20 Jun 2026 12:04:25 +0300 Subject: [PATCH] Don't use zero for pools to avoid confusion --- app/features/scrims/core/Scrim.ts | 2 +- app/features/tournament-bracket/core/Tournament.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/features/scrims/core/Scrim.ts b/app/features/scrims/core/Scrim.ts index 0235c508e..853293ce6 100644 --- a/app/features/scrims/core/Scrim.ts +++ b/app/features/scrims/core/Scrim.ts @@ -21,7 +21,7 @@ export function isParticipating(post: ScrimPost, userId: number) { } export function resolvePoolCode(postId: number) { - return `SC${postId % 10}`; + return `SC${(postId % 9) + 1}`; } /** diff --git a/app/features/tournament-bracket/core/Tournament.ts b/app/features/tournament-bracket/core/Tournament.ts index f71281602..d81056417 100644 --- a/app/features/tournament-bracket/core/Tournament.ts +++ b/app/features/tournament-bracket/core/Tournament.ts @@ -675,12 +675,17 @@ export class Tournament { // for small tournaments there should be no risk that the pool gets full // so to make it more convenient just use same suffix every match - const globalSuffix = this.ctx.teams.length <= 20 ? this.ctx.id % 10 : null; + // pool numbers are kept in the 1-9 range (0 is not used) + const globalSuffix = + this.ctx.teams.length <= 20 ? (this.ctx.id % 9) + 1 : null; return { prefix, suffix: - globalSuffix ?? groupLetters ?? bracketNumber ?? hostingTeamId % 10, + globalSuffix ?? + groupLetters ?? + bracketNumber ?? + (hostingTeamId % 9) + 1, }; }