Play Chess

Interactive browser recreation

Chess Board

Start a game

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.

    1. White moves first. Select a piece and then a highlighted destination.
    2. Pawns, knights, bishops, rooks, queens, and kings follow their standard movement rules.
    3. A move is rejected when it leaves the current player’s king in check.
    4. Castling is available when the king and relevant rook have not moved and the path is safe.
    5. A pawn reaching the final rank can be promoted to a queen, rook, bishop, or knight.
    6. The game ends in checkmate or stalemate when the current player has no legal moves.
    7. 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.

    Pawn promotion

    Choose a piece

    Select the piece that should replace the promoted pawn.