Play chess in your terminal.
Note
This project is a terminal-based chess interface that integrates with the Stockfish engine for AI moves.
Warning
This project is developed and tested on Ubuntu Linux โ compatibility with other platforms is not guaranteed.
Tip
For the best experience, we recommend running the game on GNOME Terminal.
Make sure you have:
- A C++17 compatible compiler (GCC 7+ or Clang 5+)
- GNU Make
- Stockfish binary (see below)
Follow the instructions in the Engine Setup Guide to install the Stockfish binary in the correct location.
# Clone the repository
git clone https://github.com/a7mddra/ChessTUI.git
cd ChessTUI
# Build and run the game
make runโโโ Use algebraic notation:
โโโ Moving pieces
โ โโ Highlight valid moves then move
โ โ โโ Highlight: type source (e.g. `e2`) then destination (e.g. `e4`)
โ โ โโ Direct: type the full move at once (e.g. `e2e4`)
โ โโ Direct move
โ โโ Full move in one step (e.g. `e2e4`)
โ
โโ Pawn promotion
โ โโ Step by step: `e7` โ `e8` โ `q` or `e7` โ `e8q`
โ โโ Direct: `e7e8q`
โ
โโ King castling
โ โโ Kingside: `e1g1`
โ โโ Queenside: `e1c1`
โ
โโ Special commands
โโ Flip the board โ `flip`
โโ Start a new game โ `new`
โโ Exit the app โ `quit`
-
Terminal-based UI with Unicode symbols and ANSI color highlighting
-
Complete chess rules:
- Castling (kingside/queenside)
- En passant captures
- Pawn promotion
- Check & checkmate detection
-
Stockfish AI integration
-
Move validation with visual highlights
-
Board flipping (play as white or black)
-
Live evaluation bar (material balance score)
