Skip to content

a7mddra/ChessTUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

73 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ChessTUI

Play chess in your terminal.

App Screenshot

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.


Quick Start

1. Prerequisites โš™๏ธ

Make sure you have:

  • A C++17 compatible compiler (GCC 7+ or Clang 5+)
  • GNU Make
  • Stockfish binary (see below)

2. Stockfish Installation

Follow the instructions in the Engine Setup Guide to install the Stockfish binary in the correct location.

3. Building the Project

# Clone the repository
git clone https://github.com/a7mddra/ChessTUI.git
cd ChessTUI

# Build and run the game
make run

4. Game Controls ๐ŸŽฎ

โ””โ”€โ”€ 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`

Features โœจ

  • 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)


About

Chess TUI for Stockfish Engine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published