Feature/chess#78
Open
gaganalexa wants to merge 5 commits into
Open
Conversation
- Added chess event handlers for game actions (start, resign, draw) in backend. - Implemented socket connection management for chess screens in frontend. - Enhanced game state management with draw offer handling and clock synchronization. - Updated Zustand store to include socket management and game state. - Refactored game and room screens to utilize new socket functionality. - Added chess.js library for chess logic handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
F501 + F502 + F503: Chess Game Implementation
Implemented the complete multiplayer chess feature, including gameplay UI, real-time synchronization, and multiple integration fixes discovered during development.
Features Implemented
Custom chessboard with:
Full game interface with:
Multiplayer support with:
Logic & Integration Fixes
Fixed
isBoardDisabledlogic to allow moves while in"check"state instead of incorrectly disabling the boardFixed
deriveStatusevaluation order to check for checkmate before stalemate/draw conditionsFixed
getMaterialAdvantageFEN parsing issue where uppercase pieces were skipped due to case-sensitiveincludes()checks, causing incorrect captured piece countsFixed
capturedColorprop mismatch inGameScreenwhere player/opponent captured pieces were displayed on the wrong sideFixed duplicate
game:movesocket emissions by restricting emission to the active player through properplayerColorvalidation inmakeMoveFixed clock initialization issue where backend time values were sent in milliseconds while frontend expected seconds
Fixed missing persistence fields in
createGame:white_time_leftblack_time_leftlast_move_atThis previously caused immediate timeout behavior after the first move
Fixed
updateGameStatepartial update handling to prevent unspecified fields from being overwritten withnullFixed database
capturecolumn type mismatch where the schema expectedbooleanbut the application passed captured piece identifiers