From 7f61cea3dc81855001e0cd6fdd8fef123f9067bf Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 26 Feb 2022 14:40:57 +0200 Subject: [PATCH] Try best of 7 --- app/constants.ts | 3 +++ app/core/play/mapList.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/constants.ts b/app/constants.ts index 53fc98593..76be1193c 100644 --- a/app/constants.ts +++ b/app/constants.ts @@ -20,6 +20,9 @@ export const LFG_GROUP_INACTIVE_MINUTES = 30; export const MMR_TOPX_VISIBILITY_CUTOFF = 50; +export const LFG_AMOUNT_OF_STAGES_TO_GENERATE = 7; +// export const LFG_AMOUNT_OF_STAGES_TO_GENERATE = 9; + export const checkInClosesDate = (startTime: string): Date => { return new Date(new Date(startTime).getTime() - 1000 * 10); }; diff --git a/app/core/play/mapList.ts b/app/core/play/mapList.ts index 35c656c99..e6d0b8b5f 100644 --- a/app/core/play/mapList.ts +++ b/app/core/play/mapList.ts @@ -2,9 +2,9 @@ import { Mode } from "@prisma/client"; import clone from "just-clone"; import shuffle from "just-shuffle"; import invariant from "tiny-invariant"; +import { LFG_AMOUNT_OF_STAGES_TO_GENERATE } from "~/constants"; import { StageName, stageToId } from "../stages/stages"; -const AMOUNT_OF_STAGES_TO_GENERATE = 9; const LEGAL_MODES: Mode[] = ["TC", "RM", "CB"]; // ⚠️ Every used mode needs to have at least AMOUNT_OF_STAGES_TO_GENERATE maps @@ -86,7 +86,7 @@ export function generateMapListForLfgMatch(): { const usedMaps = new Set(); const stageList: { name: string; mode: Mode }[] = []; - for (let i = 0; i < AMOUNT_OF_STAGES_TO_GENERATE; i++) { + for (let i = 0; i < LFG_AMOUNT_OF_STAGES_TO_GENERATE; i++) { const mode = (() => { if (i !== 0 && i % 2 !== 0) { return "SZ";