From 320d6943ded759066aeb1d6a8701cf17ad7d0ccb Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 16:50:19 -0500 Subject: [PATCH] Update Wire Cutting Game --- src/Infiltration/ui/WireCuttingGame.tsx | 49 ++++++++++++++----------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/src/Infiltration/ui/WireCuttingGame.tsx b/src/Infiltration/ui/WireCuttingGame.tsx index 7ca0aedbc..e8a08f453 100644 --- a/src/Infiltration/ui/WireCuttingGame.tsx +++ b/src/Infiltration/ui/WireCuttingGame.tsx @@ -1,6 +1,5 @@ import React, { useEffect, useState } from "react"; import Grid from "@mui/material/Grid"; -import Typography from "@mui/material/Typography"; import { IMinigameProps } from "./IMinigameProps"; import { KeyHandler } from "./KeyHandler"; import { GameTimer } from "./GameTimer"; @@ -10,6 +9,7 @@ import { KEY } from "../../utils/helpers/keyCodes"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Player } from "../../Player"; import { Settings } from "../../Settings/Settings"; +import { Paper, Typography, Box } from "@mui/material"; interface Difficulty { [key: string]: number; @@ -102,46 +102,53 @@ export function WireCuttingGame(props: IMinigameProps): React.ReactElement { } return ( - + <> - - Cut the wires with the following properties! (keyboard 1 to 9) + + + Cut the wires with the following properties! (keyboard 1 to 9) + {questions.map((question, i) => ( {question.toString()} ))} - + {new Array(wires.length).fill(0).map((_, i) => { const isCorrectWire = checkWire(i + 1); const color = hasAugment && !isCorrectWire ? Settings.theme.disabled : Settings.theme.primary; return ( - -  {i + 1}     - + + {i + 1} + ); })} - - {new Array(8).fill(0).map((_, i) => ( -
- + {new Array(8).fill(0).map((_, i) => ( + {wires.map((wire, j) => { if ((i === 3 || i === 4) && cutWires[j]) { - return       ; + return ; } const isCorrectWire = checkWire(j + 1); const wireColor = hasAugment && !isCorrectWire ? Settings.theme.disabled : wire.colors[i % wire.colors.length]; return ( - - |{wire.tpe}|    - + + |{wire.tpe}| + ); })} - -
- ))} + + ))} + -
-
+ + ); }