Squashed commit of the following:

commit 4810de3b94b0ec0d7e9b8570de58f85792dffa80
Author: GuillaumeSD <gsd.lfny@gmail.com>
Date:   Sat Apr 6 01:37:42 2024 +0200

    fix : lint

commit 59e0b571e6089da6c086ab6340ec6a966b2e9739
Author: GuillaumeSD <gsd.lfny@gmail.com>
Date:   Sat Apr 6 01:36:17 2024 +0200

    feat : UI refacto

commit 56806a89dca5c7fb2c229b5a57404f9a856fac09
Author: GuillaumeSD <gsd.lfny@gmail.com>
Date:   Fri Apr 5 03:56:08 2024 +0200

    feat : add moves list

commit 9e3d2347882074c38ab183e642ecef8153dbfcde
Author: GuillaumeSD <gsd.lfny@gmail.com>
Date:   Thu Apr 4 02:18:52 2024 +0200

    feat : init branch, wip
This commit is contained in:
GuillaumeSD
2024-04-06 01:38:06 +02:00
parent d9b322d9fa
commit 3d0d1c41a8
18 changed files with 328 additions and 176 deletions

View File

@@ -17,7 +17,8 @@ export default function BoardContainer() {
const screenSize = useScreenSize();
const boardOrientation = useAtomValue(boardOrientationAtom);
const showBestMoveArrow = useAtomValue(showBestMoveArrowAtom);
const { whiteName, blackName } = usePlayersNames(gameAtom);
const { whiteName, whiteElo, blackName, blackElo } =
usePlayersNames(gameAtom);
const boardSize = useMemo(() => {
const width = screenSize.width;
@@ -28,7 +29,7 @@ export default function BoardContainer() {
return Math.min(width, height - 150);
}
return Math.min(width - 600, height * 0.95);
return Math.min(width - 700, height * 0.95);
}, [screenSize]);
return (
@@ -37,8 +38,8 @@ export default function BoardContainer() {
boardSize={boardSize}
canPlay={true}
gameAtom={boardAtom}
whitePlayer={whiteName}
blackPlayer={blackName}
whitePlayer={`${whiteName} (${whiteElo})`}
blackPlayer={`${blackName} (${blackElo})`}
boardOrientation={boardOrientation ? Color.White : Color.Black}
currentPositionAtom={currentPositionAtom}
showBestMoveArrow={showBestMoveArrow}