- Rewrote
createGame()to remove unreachable code after return - Fixed
makeMove()to use matched legal move flags instead of raw input (castling and en passant were silently ignored when called without flags) - Fixed
makeMove()missing return value on success - Added
undoMove()with full state restoration (board, castling rights, en passant target, half-move clock, full-move number) - Fixed en passant target not being cleared on non-pawn moves
- Fixed
isCheckmate()andisStalemate()not receiving en passant and castling context - Fixed
initializeBoard()pawn rows usingArray.fill()with shared object references - Added rook existence check to castling generation
- Added king-in-check guard before allowing castling
- Added half-move clock and full-move number tracking
- Added insufficient material draw detection in status computation
- Added 50-move rule draw detection
- Implemented Standard Algebraic Notation generation with captures, disambiguation, check, and checkmate suffixes
- Implemented FEN export, import, and validation
- Added
findKing()utility to board module - Populated
utils.tswith coordinate conversion helpers - Removed unused
posEqfrom move generator - Changed
GameStatusvalue from"normal"to"playing"for clarity
- Fixed board orientation (white at bottom, black at top)
- Added file and rank labels (a-h, 1-8)
- Replaced flat legal move highlighting with dot indicators for empty squares and ring indicators for capturable pieces
- Added smooth background transitions on squares
- Improved check indication color
- Added move history panel with numbered SAN move pairs
- Added FEN display with copy button
- Added FEN input field with validation and load support
- Removed
moveToSANfrom UI layer (chess logic moved to engine) - Added piece shadows for depth
- Promotion modal now shows piece symbols instead of text labels, with overlay backdrop
- Added global base styles in
index.html - Changed "Reset" button label to "New Game"
- Installed
@types/reactand@types/react-dom - Removed duplicate
vite.config.mjs - Rewrote
useGamehook with proper deep cloning anduseCallbackmemoization - Fixed
useGamereferencing undefinedundoMoveimport - Made all engine modules framework-agnostic with zero React imports
- Removed all unused imports and type parameters
- Removed
rowandcolprops fromSquarecomponent (unused internally) - Strict TypeScript throughout with no
anycasts
- Rewrote all tests with correct board setups
- Fixed en passant test (was testing wrong rank configuration)
- Added tests for: castling execution, en passant capture, undo of castling/en passant/promotion, FEN round-trip, FEN loading, FEN rejection, SAN recording, insufficient material
- Rewrote README with accurate feature list and architecture description
- Rewrote Changelog with structured technical entries
- Initial implementation: board rendering, move generation, basic rules, React UI
- Castling, en passant, promotion, check/checkmate/stalemate detection
- Board interaction: click-to-select, move highlighting, promotion modal
- Move history panel, undo and reset
- Unit tests for core rules