IPVGO: add scoring rules explanations to how to play page and score modal (#1558)

This commit is contained in:
Michael Ficocelli
2024-08-08 20:44:19 -04:00
committed by GitHub
parent 59bb58535e
commit e16ac34c15
5 changed files with 68 additions and 4 deletions
+14 -3
View File
@@ -1,6 +1,6 @@
import type { GoScore } from "../Types";
import React from "react";
import { Button, Typography } from "@mui/material";
import { Button, Typography, Box } from "@mui/material";
import { GoOpponent, GoColor } from "@enums";
import { Modal } from "../../ui/React/Modal";
@@ -13,10 +13,18 @@ interface Props {
onClose: () => void;
finalScore: GoScore;
newSubnet: () => void;
showScoreExplanation: () => void;
opponent: GoOpponent;
}
export const GoScoreModal = ({ open, onClose, finalScore, newSubnet, opponent }: Props): React.ReactElement => {
export const GoScoreModal = ({
open,
onClose,
finalScore,
newSubnet,
showScoreExplanation,
opponent,
}: Props): React.ReactElement => {
const { classes } = boardStyles();
const blackScore = finalScore[GoColor.black];
@@ -47,7 +55,10 @@ export const GoScoreModal = ({ open, onClose, finalScore, newSubnet, opponent }:
) : (
""
)}
<Button onClick={newSubnet}>New Subnet</Button>
<Box className={classes.inlineFlexBox}>
<Button onClick={showScoreExplanation}>Score Explanation</Button>
<Button onClick={newSubnet}>New Subnet</Button>
</Box>
</div>
</>
</Modal>