From b0b13de682a6ec4f6eb6c8a599b104861ef754a9 Mon Sep 17 00:00:00 2001 From: Miharup <74781355+kiharu3112@users.noreply.github.com> Date: Wed, 13 Nov 2024 21:40:21 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20config=E3=82=92Matz=E8=91=89=E3=81=8C?= =?UTF-8?q?=E3=81=AB=E3=83=AD=E3=83=9C=E3=82=B3=E3=83=B3=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C=E3=81=95=E3=81=9B=E3=81=9F=20(#686)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix:試合結果のゴールタイムの表示を修正した * fix:configをMatz葉がにロボコンに対応させた * fix:configに合わせてテストを修正 --- packages/config/src/config.ts | 41 +++++++++++-------- .../src/match/service/generatePre.test.ts | 18 ++++---- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/packages/config/src/config.ts b/packages/config/src/config.ts index 986db109..ddfc282d 100644 --- a/packages/config/src/config.ts +++ b/packages/config/src/config.ts @@ -18,6 +18,11 @@ export const config = createConfig( { type: "elementary", name: "小学生部門", + robotTypes: ["leg", "wheel"], + }, + { + type: "open", + name: "オープン部門", robotTypes: ["leg"], }, ], @@ -27,7 +32,8 @@ export const config = createConfig( name: "予選", limitSeconds: 180, course: { - elementary: 1, + elementary: 2, + open: 1, }, }, { @@ -35,21 +41,22 @@ export const config = createConfig( name: "本戦", limitSeconds: 180, course: { - elementary: 0, + elementary: 2, + open: 1, }, }, ], rules: [ - // { - // name: "multiWalk", - // label: "歩行型", - // type: "single", - // initial: true, // conditionsの"scorable"で制御する - // point: (done: boolean) => (done ? 2 : 0), - // }, + { + name: "multiWalk", + label: "歩行型", + type: "single", + initial: true, // conditionsの"scorable"で制御する + point: (done: boolean) => (done ? 2 : 0), + }, { name: "leaveBase", - label: "水草エリアを出た", + label: "松江エリアを出た", type: "single", initial: false, point: (done: boolean) => (done ? 1 : 0), @@ -63,21 +70,21 @@ export const config = createConfig( }, { name: "enterDestination", - label: "温暖化エリアに入った", + label: "金星エリアに入った", type: "single", initial: false, point: (done: boolean) => (done ? 1 : 0), }, { name: "placeBall", - label: "温暖化エリアに氷を置いた", + label: "金星エリアにプローブを投入した", type: "single", initial: false, point: (done: boolean) => (done ? 1 : 0), }, { name: "returnBase", - label: "水草エリアに戻った", + label: "松江エリアに戻った", type: "single", initial: false, point: (done: boolean) => (done ? 2 : 0), @@ -91,7 +98,7 @@ export const config = createConfig( }, { name: "bringBall", - label: "どじょうの数", + label: "雲粒子の数", type: "countable", initial: 0, point: (count: number) => count, @@ -99,7 +106,7 @@ export const config = createConfig( }, { name: "bringRareBall", - label: "激レアどじょうの数", + label: "激レアメタルの数", type: "countable", initial: 0, point: (count: number) => count, @@ -166,11 +173,11 @@ export const config = createConfig( }, bringRareBall: { visible: (state) => - !state.matchInfo || state.matchInfo.matchType === "main", // 本戦以外では激レアどじょうを表示しない + !state.matchInfo || state.matchInfo.matchType === "main", // 本戦以外では激レアメタルを表示しない changeable: (state) => !state.matchState[state.side]?.getPointState().finish, scorable: (state) => - !state.matchInfo || state.matchInfo.matchType === "main", // 本戦以外では激レアどじょうに得点を与えない + !state.matchInfo || state.matchInfo.matchType === "main", // 本戦以外では激レアメタルに得点を与えない }, finish: { changeable: (state) => diff --git a/packages/kcms/src/match/service/generatePre.test.ts b/packages/kcms/src/match/service/generatePre.test.ts index 0bf223d0..d8f5203d 100644 --- a/packages/kcms/src/match/service/generatePre.test.ts +++ b/packages/kcms/src/match/service/generatePre.test.ts @@ -20,18 +20,20 @@ describe('GeneratePreMatchService', () => { const expectedTeamPair = [ [ - ['A1', 'B2'], - ['A2', 'B3'], - ['A3', 'C1'], - ['A4', 'C2'], - ['B1', 'N1'], - ['B2', 'N2'], + ['A1', 'B3'], + ['A3', 'C2'], + ['B1', 'N2'], ['B3', 'A1'], - ['C1', 'A2'], ['C2', 'A3'], - ['N1', 'A4'], ['N2', 'B1'], ], + [ + ['A2', 'B2'], + ['A4', 'C1'], + ['B2', 'N1'], + ['C1', 'A2'], + ['N1', 'A4'], + ], ]; it('正しく予選対戦表を生成できる', async () => {