Skip to content

Chess in pure Python, ANSI-colored board, playable directly from your VS Code terminal.

Notifications You must be signed in to change notification settings

andrecop/TerminalChess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stealth Chess ♟️

A minimalist terminal-based Chess game with AI, designed to be played directly inside VS Code (or any ANSI-compatible terminal).
It features live typing input, colored board highlights, and a simple but effective Python AI.

✨ Features

  • ASCII/ANSI chessboard with wood-like colors (light/dark brown).
  • Live UCI input (type moves as you go, with immediate highlights).
  • Last move highlighting and legal move hints.
  • Simple but real AI opponent, with adjustable depth and max time.
  • Support for flip board, undo, and FEN export.
  • Works on Windows, Linux, macOS (tested mostly in VS Code terminal).

🖼 Screenshot

Stealth Chess Screenshot

(micro-terminal)


Stealth Chess Screenshot

(full window)

🛠 Requirements

Install dependencies:

pip install python-chess

▶️ Usage

Run the main script:

python stealth_chess_ai.py

You can then:

  • Type moves in UCI format (e.g. e2e4).
  • Use commands starting with : (e.g. :undo, :help, :ai).
  • Play against the AI or just use it as a move validator.

⌨️ Commands

  • :ai → AI makes a move immediately

  • :aion / :aioff → toggle automatic AI replies

  • :depth N → set max search depth

  • :maxtime T → set AI max time per move

  • :flip → flip the board

  • :undo → undo last move

  • :moves → list legal moves

  • :fen → print current FEN

  • :quit → exit

📜 License

This project is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

About

Chess in pure Python, ANSI-colored board, playable directly from your VS Code terminal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages