fix infil

This commit is contained in:
Olivier Gagnon 2021-10-01 22:27:32 -04:00
parent cc02701e97
commit 447731c5f3
5 changed files with 10 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -96,7 +96,7 @@ export function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement {
<br /> <br />
{grid.map((line, y) => ( {grid.map((line, y) => (
<div key={y}> <div key={y}>
<pre> <Typography>
{line.map((cell, x) => { {line.map((cell, x) => {
if (x == pos[0] && y == pos[1]) if (x == pos[0] && y == pos[1])
return ( return (
@ -110,7 +110,7 @@ export function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement {
</span> </span>
); );
})} })}
</pre> </Typography>
<br /> <br />
</div> </div>
))} ))}

@ -85,7 +85,7 @@ export function MinesweeperGame(props: IMinigameProps): React.ReactElement {
<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}>
<pre> <Typography>
{line.map((cell, x) => { {line.map((cell, x) => {
if (memoryPhase) { if (memoryPhase) {
if (minefield[y][x]) return <span key={x}>[?]&nbsp;</span>; if (minefield[y][x]) return <span key={x}>[?]&nbsp;</span>;
@ -96,7 +96,7 @@ export function MinesweeperGame(props: IMinigameProps): React.ReactElement {
return <span key={x}>[&nbsp;]&nbsp;</span>; return <span key={x}>[&nbsp;]&nbsp;</span>;
} }
})} })}
</pre> </Typography>
<br /> <br />
</div> </div>
))} ))}

@ -98,14 +98,14 @@ export function WireCuttingGame(props: IMinigameProps): React.ReactElement {
{questions.map((question, i) => ( {questions.map((question, i) => (
<Typography key={i}>{question.toString()}</Typography> <Typography key={i}>{question.toString()}</Typography>
))} ))}
<pre> <Typography>
{new Array(wires.length).fill(0).map((_, i) => ( {new Array(wires.length).fill(0).map((_, i) => (
<span key={i}>&nbsp;{i + 1}&nbsp;&nbsp;&nbsp;&nbsp;</span> <span key={i}>&nbsp;{i + 1}&nbsp;&nbsp;&nbsp;&nbsp;</span>
))} ))}
</pre> </Typography>
{new Array(8).fill(0).map((_, i) => ( {new Array(8).fill(0).map((_, i) => (
<div key={i}> <div key={i}>
<pre> <Typography>
{wires.map((wire, j) => { {wires.map((wire, j) => {
if ((i === 3 || i === 4) && cutWires[j]) if ((i === 3 || i === 4) && cutWires[j])
return <span key={j}>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>; return <span key={j}>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>;
@ -115,7 +115,7 @@ export function WireCuttingGame(props: IMinigameProps): React.ReactElement {
</span> </span>
); );
})} })}
</pre> </Typography>
</div> </div>
))} ))}
<KeyHandler onKeyDown={press} onFailure={props.onFailure} /> <KeyHandler onKeyDown={press} onFailure={props.onFailure} />