Play Chess
Interactive browser recreation
Chess Board
Configure the players and start a new game.
Select one of your pieces, then choose a highlighted legal destination.
Game Log
About this project
Original C++ chess logic, recreated for the browser.
This project began as a console-based C++ chess application. The browser version preserves the board, legal piece movement, check protection, castling, pawn promotion, checkmate, stalemate, hints, AI play, save/load, and undo/redo behavior.
The original implementation and its sample save file remain in the
cpp folder. The playable website uses only HTML, CSS, and
Vanilla JavaScript and can be deployed as a static Vercel project.
How to play
Use standard chess movement and protect your king.
- White moves first. Select a piece and then a highlighted destination.
- Pawns, knights, bishops, rooks, queens, and kings follow their standard movement rules.
- A move is rejected when it leaves the current player’s king in check.
- Castling is available when the king and relevant rook have not moved and the path is safe.
- A pawn reaching the final rank can be promoted to a queen, rook, bishop, or knight.
- The game ends in checkmate or stalemate when the current player has no legal moves.
- Use Save and Load for browser storage, and Undo or Redo to move through history.
Repository
C++ source and web recreation in one project.
Add the final public GitHub URL in script.js after creating
the repository. The repository button will then appear automatically.