From eb2ab8e29e2ae6a746b96e426320130c16ae5523 Mon Sep 17 00:00:00 2001 From: Vikeo Date: Sat, 8 Jul 2023 10:56:25 +0200 Subject: [PATCH] default to normal 4 player --- my-app/src/App.tsx | 4 ++-- my-app/src/Data/getInitialPlayers.ts | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/my-app/src/App.tsx b/my-app/src/App.tsx index 31dd3a4..3d76d50 100644 --- a/my-app/src/App.tsx +++ b/my-app/src/App.tsx @@ -6,10 +6,10 @@ import Play from './Components/Views/Play'; import { GridTemplateAreas } from './Data/getGridTemplateAreas'; export const initialPlayerOptions = { - numberOfPlayers: 3, + numberOfPlayers: 4, startingLifeTotal: 40, useCommanderDamage: true, - gridAreas: GridTemplateAreas.ThreePlayersSide, + gridAreas: GridTemplateAreas.FourPlayers, }; const App = () => { diff --git a/my-app/src/Data/getInitialPlayers.ts b/my-app/src/Data/getInitialPlayers.ts index 3f10611..6f0e820 100644 --- a/my-app/src/Data/getInitialPlayers.ts +++ b/my-app/src/Data/getInitialPlayers.ts @@ -76,6 +76,19 @@ const getRotation = (index: number, gridAreas: GridTemplateAreas): Rotation => { } } + if (gridAreas === GridTemplateAreas.FourPlayers) { + switch (index) { + case 1: + return Rotation.Flipped; + case 2: + return Rotation.Flipped; + case 3: + return Rotation.Normal; + default: + return Rotation.Normal; + } + } + return Rotation.Normal; };