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
+5 -1
View File
@@ -19,6 +19,7 @@ import { GoGameboard } from "./GoGameboard";
import { GoSubnetSearch } from "./GoSubnetSearch";
import { CorruptableText } from "../../ui/React/CorruptableText";
import { makeAIMove, resolveCurrentTurn } from "../boardAnalysis/goAI";
import { GoScoreExplanation } from "./GoScoreExplanation";
interface GoGameboardWrapperProps {
showInstructions: () => void;
@@ -44,6 +45,7 @@ export function GoGameboardWrapper({ showInstructions }: GoGameboardWrapperProps
const traditional = Settings.GoTraditionalStyle;
const [showPriorMove, setShowPriorMove] = useState(false);
const [scoreOpen, setScoreOpen] = useState(false);
const [scoreExplanationOpen, setScoreExplanationOpen] = useState(false);
const [searchOpen, setSearchOpen] = useState(false);
const { classes } = boardStyles();
@@ -203,7 +205,9 @@ export function GoGameboardWrapper({ showInstructions }: GoGameboardWrapperProps
newSubnet={() => newSubnet()}
finalScore={score}
opponent={Go.currentGame.ai}
></GoScoreModal>
showScoreExplanation={() => setScoreExplanationOpen(true)}
/>
<GoScoreExplanation onClose={() => setScoreExplanationOpen(false)} open={scoreExplanationOpen} />
<div className={classes.boardFrame}>
{traditional ? (
""