Update Bracket Game

This commit is contained in:
nickofolas
2022-04-24 14:43:19 -05:00
parent 0396e4066c
commit 43e2fc8d87
2 changed files with 6 additions and 6 deletions

View File

@@ -6,10 +6,10 @@ import { GameTimer } from "./GameTimer";
import { random } from "../utils"; import { random } from "../utils";
import { interpolate } from "./Difficulty"; import { interpolate } from "./Difficulty";
import { BlinkingCursor } from "./BlinkingCursor"; import { BlinkingCursor } from "./BlinkingCursor";
import Typography from "@mui/material/Typography";
import { Player } from "../../Player"; import { Player } from "../../Player";
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
import { KEY } from "../../utils/helpers/keyCodes"; import { KEY } from "../../utils/helpers/keyCodes";
import { Paper, Box, Typography } from "@mui/material";
interface Difficulty { interface Difficulty {
[key: string]: number; [key: string]: number;
@@ -84,16 +84,16 @@ export function BracketGame(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">Close the brackets</Typography> <Typography variant="h4">Close the brackets</Typography>
<Typography style={{ fontSize: "5em" }}> <Typography style={{ fontSize: "5em" }}>
{`${left}${right}`} {`${left}${right}`}
<BlinkingCursor /> <BlinkingCursor />
</Typography> </Typography>
<KeyHandler onKeyDown={press} onFailure={props.onFailure} /> <KeyHandler onKeyDown={press} onFailure={props.onFailure} />
</Grid> </Paper>
</Grid> </>
); );
} }

View File

@@ -60,7 +60,7 @@ export function SlashGame(props: IMinigameProps): React.ReactElement {
return ( return (
<> <>
<GameTimer millis={5000} onExpire={props.onFailure} /> <GameTimer millis={5000} onExpire={props.onFailure} />
<Paper sx={{ display: "grid", gridTemplateColumns: "1fr", justifyItems: "center" }}> <Paper sx={{ display: "grid", justifyItems: "center" }}>
<Typography variant="h4">Slash when his guard is down!</Typography> <Typography variant="h4">Slash when his guard is down!</Typography>
{hasAugment ? ( {hasAugment ? (