mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-09-20 04:48:38 +02:00
Update Minesweeper Game
This commit is contained in:
parent
b3879e386f
commit
13d7f6d4e9
@ -5,10 +5,10 @@ import { KeyHandler } from "./KeyHandler";
|
|||||||
import { GameTimer } from "./GameTimer";
|
import { GameTimer } from "./GameTimer";
|
||||||
import { interpolate } from "./Difficulty";
|
import { interpolate } from "./Difficulty";
|
||||||
import { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from "../utils";
|
import { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from "../utils";
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import { KEY } from "../../utils/helpers/keyCodes";
|
import { KEY } from "../../utils/helpers/keyCodes";
|
||||||
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;
|
||||||
@ -82,9 +82,9 @@ export function MinesweeperGame(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">{memoryPhase ? "Remember all the mines!" : "Mark all the mines!"}</Typography>
|
<Typography variant="h4">{memoryPhase ? "Remember all the mines!" : "Mark all the mines!"}</Typography>
|
||||||
{minefield.map((line, y) => (
|
{minefield.map((line, y) => (
|
||||||
<div key={y}>
|
<div key={y}>
|
||||||
@ -105,8 +105,8 @@ export function MinesweeperGame(props: IMinigameProps): React.ReactElement {
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
<KeyHandler onKeyDown={press} onFailure={props.onFailure} />
|
<KeyHandler onKeyDown={press} onFailure={props.onFailure} />
|
||||||
</Grid>
|
</Paper>
|
||||||
</Grid>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user