feat: 토너먼트 자동 시작 핸들러 추가 및 관련 로직 구현

This commit is contained in:
2026-01-23 18:34:50 +00:00
parent 144b8d5705
commit 5846146ff3
5 changed files with 128 additions and 4 deletions
+1 -2
View File
@@ -351,7 +351,6 @@ const sortByRanking = (entries: TournamentParticipantEntry[]): TournamentPartici
};
const buildFinal16MatchesFromGroups = (
state: TournamentState,
participants: TournamentParticipantEntry[]
): TournamentMatchEntry[] | null => {
const groupOrder = [10, 14, 11, 15, 12, 16, 13, 17, 14, 10, 15, 11, 16, 12, 17, 13];
@@ -935,7 +934,7 @@ const applyPreBattleStage = async (
if (state.stage === 5) {
const matches = await store.getMatches();
if (matches.length === 0) {
const fixedMatches = buildFinal16MatchesFromGroups(state, participants);
const fixedMatches = buildFinal16MatchesFromGroups(participants);
const participantIds = fixedMatches
? fixedMatches.flatMap((entry) => [entry.attackerId, entry.defenderId])
: pickFinalists(state, participants);