Skip to main content

A command-line chess game

Project description

Chess CLI

Thanks for opening.

A chess game that you can play in your terminal! I made this project to get experience in building a application in dev-professional way with project structure and industry standard practices and to also understand how to pushlish a python package to the INTERNET.

Features

  • you can paly chess in your terminal, FYI this is does not contain full piece movements and rules, but most of them are implemented

Installation

From PyPI (Recommended)

pip install kesav-chess-cli

From Source

git clone https://github.com/saikesav-sai/chess_cli.git
cd chess_cli
pip install -e .

Requirements

  • Python 3.9 or higher
  • colorama (automatically installed with the package)

Usage

After installation, simply run:

chess-cli

How to Play

  1. The game starts with the standard chess board setup
  2. Players alternate turns (Yellow starts first)
  3. Enter moves in the format: source destination (e.g., e2 e4)
  4. Press q to quit the game at any time

Input Format

Moves are entered using chess notation:

  • Columns: a through h (left to right)
  • Rows: 1 through 8 (bottom to top)

Project Structure

chess_cli/
├── src/
│   └── chess_cli/
│       ├── play_chess.py          # Main game entry point
│       ├── Board/
│       │   └── build.py           # Board initialization
│       └── Game_Engine/
│           ├── runner.py          # Game loop and logic
│           ├── static_variables.py
│           ├── Error_handler/     # Error handling modules
│           ├── Game_Rules/        # Chess rules validation
│           └── Game_utils/        # Utility functions
├── tests/                         # Unit tests
├── pyproject.toml                 # Project configuration
└── README.md

Running Tests

python -m pytest tests/

License

This project is licensed under The GNU GENERAL PUBLIC LICENSE.

Author

Sai Kesav

Made with ❤️ by ME

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kesav_chess_cli-1.1.3.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kesav_chess_cli-1.1.3-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file kesav_chess_cli-1.1.3.tar.gz.

File metadata

  • Download URL: kesav_chess_cli-1.1.3.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for kesav_chess_cli-1.1.3.tar.gz
Algorithm Hash digest
SHA256 ec75f329864daa55acc404cb3ffe6f85760e8b24bc2035ea515c14d06ebd9ceb
MD5 dddfc0e19419488cf52ae73e4d1934f7
BLAKE2b-256 2497827dbf2e81cdf87c224614e7d0a4ce5ff18cf24cecbe5ec93211124c8203

See more details on using hashes here.

File details

Details for the file kesav_chess_cli-1.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for kesav_chess_cli-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7e239fb666d36acda15326bbe4a7dbd0b1557c4a96fb85fcd8f68d7141c9776e
MD5 4fcb70f48843bef893bece5c4fa24db5
BLAKE2b-256 2133abf2efe270b182507167b55ea9dd02d0fd28c5af944f298866aba6ae88ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page