From f14c8270ef6ed126b5bda66e9fc2e53f06e81c60 Mon Sep 17 00:00:00 2001 From: Francisco Salgueiro Date: Fri, 29 Sep 2023 16:40:13 +0100 Subject: [PATCH] fix human playing --- src/components/boards/BoardGame.tsx | 2 +- src/components/boards/BoardPlay.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/boards/BoardGame.tsx b/src/components/boards/BoardGame.tsx index 628a9548..e4c90f00 100644 --- a/src/components/boards/BoardGame.tsx +++ b/src/components/boards/BoardGame.tsx @@ -218,7 +218,7 @@ function BoardGame() { viewOnly={opponent === null} disableVariations boardRef={boardRef} - side={playingColor} + side={opponent === "human" ? undefined : playingColor} root={root} /> } diff --git a/src/components/boards/BoardPlay.tsx b/src/components/boards/BoardPlay.tsx index 90c2ca64..6ef6fc54 100644 --- a/src/components/boards/BoardPlay.tsx +++ b/src/components/boards/BoardPlay.tsx @@ -259,7 +259,7 @@ function BoardPlay({ const { pieces, diff } = getMaterialDiff(currentNode.fen); const practiceLock = - practicing && !deck.find((c) => c.fen === currentNode.fen); + !!practicing && !deck.find((c) => c.fen === currentNode.fen); return ( <>