Interactive browser recreation

Game Board

Red’s turn
Red cells0
Total moves0
Blue cells0

Game ready

Select an empty cell for your first move. After that, play only on cells you own.

Game Log

    About this project

    Original C++ game logic, recreated for the browser.

    The original Windows Console C++ coursework uses a 5 × 5 board, Red and Blue players, mouse-based console input, explosions and captures, and file-based save and load.

    This browser recreation uses HTML, CSS, and Vanilla JavaScript while preserving the first-move and own-cell rules, orthogonal spreading, chain reactions, and winner detection. Browser storage replaces save.txt.

    How to play

    Build cells, trigger reactions, and capture the board.

    1. Red plays first.
    2. Each player’s first move must be made on an empty cell.
    3. The first move places three beads in that cell.
    4. After the first move, a player may select only a cell they own.
    5. Selecting an owned cell increases its bead count by one.
    6. A cell explodes when it reaches four beads.
    7. An explosion sends one bead to each valid up, down, left, and right neighbour.
    8. Every affected neighbour becomes owned by the current player.
    9. Chain reactions continue until every cell contains fewer than four beads.
    10. After both players have entered the board, the player who owns every occupied cell wins.

    Repository

    C++ source and browser recreation in one project.

    The repository preserves the original coursework file alongside the playable browser recreation, game-engine tests, and implementation notes.