Squashed commit of the following:

commit c769a4d3bfbd22804ea4eeb324e7afeaaaa55f82
Author: GuillaumeSD <gsd.lfny@gmail.com>
Date:   Fri Apr 12 02:49:21 2024 +0200

    style : capturedPieces UI final touches

commit 838ad95bfa1746a3a8de38ace2520fe93ec6a0af
Author: GuillaumeSD <gsd.lfny@gmail.com>
Date:   Thu Apr 11 03:00:01 2024 +0200

    feat : captured pieces wip

commit e4bb4dcc346aa5dea5527fef4389b01673645e76
Merge: 785dba2 e9e772c
Author: GuillaumeSD <gsd.lfny@gmail.com>
Date:   Thu Apr 11 01:15:31 2024 +0200

    Merge branch 'main' into feat/add-board-captured-pieces

commit 785dba28509ac04655d4cab736a18a821ca52433
Author: GuillaumeSD <gsd.lfny@gmail.com>
Date:   Tue Apr 9 02:25:29 2024 +0200

    feat : add board captured pieces init
This commit is contained in:
GuillaumeSD
2024-04-12 02:49:48 +02:00
parent e9e772ca81
commit daaf145fa9
6 changed files with 211 additions and 6 deletions

View File

@@ -14,6 +14,7 @@ import { Chess } from "chess.js";
import { getSquareRenderer, moveClassificationColors } from "./squareRenderer";
import { CurrentPosition } from "@/types/eval";
import EvaluationBar from "./evaluationBar";
import CapturedPieces from "./capturedPieces";
export interface Props {
id: string;
@@ -230,10 +231,16 @@ export default function Board({
xs={12}
justifyContent="center"
alignItems="center"
columnGap={2}
>
<Typography variant="h6">
<Typography>
{boardOrientation === Color.White ? blackPlayer : whitePlayer}
</Typography>
<CapturedPieces
gameAtom={gameAtom}
color={boardOrientation === Color.White ? Color.Black : Color.White}
/>
</Grid>
<Grid
@@ -275,10 +282,13 @@ export default function Board({
xs={12}
justifyContent="center"
alignItems="center"
columnGap={2}
>
<Typography variant="h6">
<Typography>
{boardOrientation === Color.White ? whitePlayer : blackPlayer}
</Typography>
<CapturedPieces gameAtom={gameAtom} color={boardOrientation} />
</Grid>
</Grid>
</Grid>