Update Cheat Code Game

This commit is contained in:
nickofolas
2022-04-24 14:54:43 -05:00
parent 2d90d41b4e
commit 4bf6acf95c

View File

@@ -13,9 +13,9 @@ import {
downArrowSymbol, downArrowSymbol,
} from "../utils"; } from "../utils";
import { interpolate } from "./Difficulty"; import { interpolate } from "./Difficulty";
import Typography from "@mui/material/Typography";
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
import { Player } from "../../Player"; import { Player } from "../../Player";
import { Paper, Typography, Box } from "@mui/material";
interface Difficulty { interface Difficulty {
[key: string]: number; [key: string]: number;
@@ -55,14 +55,14 @@ export function CheatCodeGame(props: IMinigameProps): React.ReactElement {
} }
return ( return (
<Grid container spacing={3}> <>
<GameTimer millis={timer} onExpire={props.onFailure} /> <GameTimer millis={timer} onExpire={props.onFailure} />
<Grid item xs={12}> <Paper sx={{ display: "grid", justifyItems: "center" }}>
<Typography variant="h4">Enter the Code!</Typography> <Typography variant="h4">Enter the Code!</Typography>
<Typography variant="h4">{code[index]}</Typography> <Typography variant="h4">{code[index]}</Typography>
<KeyHandler onKeyDown={press} onFailure={props.onFailure} /> <KeyHandler onKeyDown={press} onFailure={props.onFailure} />
</Grid> </Paper>
</Grid> </>
); );
} }