Don't use zero for pools to avoid confusion

This commit is contained in:
Kalle
2026-06-20 12:04:25 +03:00
parent b9a1daed45
commit 056809b3ef
2 changed files with 8 additions and 3 deletions

View File

@@ -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}`;
}
/**

View File

@@ -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,
};
}