Skip to content

Commit cf3ee97

Browse files
committed
fix: correct player color assignment
1 parent 3108864 commit cf3ee97

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

react-ystemandchess/src/features/lessons/piece-lessons/lesson-overlay/Lesson-overlay.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ const LessonOverlay: React.FC<LessonOverlayProps> = ({
384384
// Determine player color from FEN
385385
const turn = getTurnFromFEN(lessonData.startFen);
386386
setBoardOrientation(turn);
387+
playerColorRef.current = turn;
387388

388389
// Initialize game position
389390
gameRef.current = new Chess(lessonData.startFen);

0 commit comments

Comments
 (0)