Play Bara Tehni

Interactive browser recreation

Game Board

Start a game
Player 1 12

Beads remaining

Computer 12

Configure the players and start a new game.

Select one of your beads, then select an empty adjacent square or a valid capture square.

Game Log

    About this project

    Original C++ logic, recreated for the browser.

    Bara Tehni is a two-player strategy board game played on a fixed 5×5 board. This version preserves the coursework rules, board setup, movement, captures, bead counts, computer opponent, save/load flow, and undo/redo controls.

    The original implementation remains available in the cpp folder. The playable version uses only HTML, CSS, and Vanilla JavaScript, so it can be deployed as a static website on Vercel.

    How to play

    Move carefully and capture strategically.

    1. Player 1 uses X beads and Player 2 uses O beads.
    2. A normal move travels one square in any horizontal, vertical, or diagonal direction.
    3. A capture jumps exactly two squares over one opposing bead into an empty square.
    4. After a capture, the same player keeps the turn when another capture is available from the landing square.
    5. A player wins by capturing all opposing beads or leaving the opponent with no valid move.
    6. Use Save and Load for browser storage, and Undo or Redo to move through game history.

    Repository

    C++ source and web recreation in one project.

    Add the final public GitHub URL in script.js after creating the repository. The button will appear automatically.