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)

I will update the Command once the package is published to PyPI

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/
│   └── reader/
│       ├── 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.0.2.tar.gz (10.9 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.0.2-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kesav_chess_cli-1.0.2.tar.gz
  • Upload date:
  • Size: 10.9 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.0.2.tar.gz
Algorithm Hash digest
SHA256 98c28f3cd7fc82054d1e463c9e931c0e9ce6cb5e31d0aa49866a265d651a96a1
MD5 1b2fc1e23840e2e86c01c952492a0396
BLAKE2b-256 b0519aed17c7668e09fe6e610e2a98a4d07e17a8741a12c0d85a93673c9a0125

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kesav_chess_cli-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dbb6772a532f6f48dbadc176999366d933ce5c41070f9b72e379d27158a69fbb
MD5 80ec5b655df188084edc6818bd6f9acf
BLAKE2b-256 0a06eadb6c4a84275a1e03a047092d95547297533a40be9bf046a11e393b6007

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