aboutsummaryrefslogtreecommitdiff
path: root/src/components/App.tsx
diff options
context:
space:
mode:
authorMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-07-21 19:43:33 +0530
committerMikunoNaka <bokuwakanojogahoshii@yahoo.com>2021-07-21 19:43:33 +0530
commit87e3e6bf66dc18a324417e05043874792749a8c5 (patch)
tree92948b725b200a0e0f7d8574934a1b4d45b6f11b /src/components/App.tsx
parent2219ac3e3db3ead7cb9b8ef88726225b1754d6f3 (diff)
Fixed styling and add prompt for player
Diffstat (limited to 'src/components/App.tsx')
-rw-r--r--src/components/App.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/App.tsx b/src/components/App.tsx
index 141b332..6a9c60e 100644
--- a/src/components/App.tsx
+++ b/src/components/App.tsx
@@ -26,13 +26,14 @@ import './style.css';
const App: React.FC = () => {
const [scoreX, setScoreX] = useState<number>(0);
const [scoreO, setScoreO] = useState<number>(0);
+ const [turn, setTurn] = useState<number>(0);
const [showMessageBox, setShowMessageBox] = useState<boolean>(false);
const [message, setMessage] = useState<string>("");
return (
<>
{showMessageBox && <MessageBox message={message} setShowMessage={setShowMessageBox}/>}
- <ScoreBoard scoreX={scoreX} scoreO={scoreO}/>
- <Grid scoreX={scoreX} setScoreX={setScoreX} scoreO={scoreO} setScoreO={setScoreO} setMessage={setMessage} setShowMessage={setShowMessageBox}/>
+ <ScoreBoard turn={turn} scoreX={scoreX} scoreO={scoreO}/>
+ <Grid turn={turn} setTurn={setTurn} scoreX={scoreX} setScoreX={setScoreX} scoreO={scoreO} setScoreO={setScoreO} setMessage={setMessage} setShowMessage={setShowMessageBox}/>
<Footer/>
</>
);