Skip to content

Commit

Permalink
fix human playing
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoBSalgueiro committed Sep 29, 2023
1 parent 5baf0fe commit f14c827
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/boards/BoardGame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function BoardGame() {
viewOnly={opponent === null}
disableVariations
boardRef={boardRef}
side={playingColor}
side={opponent === "human" ? undefined : playingColor}
root={root}
/>
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/boards/BoardPlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
Expand Down

0 comments on commit f14c827

Please sign in to comment.