mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-22 11:05:09 -05:00
Don't use zero for pools to avoid confusion
This commit is contained in:
@@ -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}`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user