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.3.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.3-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kesav_chess_cli-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 8c58767fba0af1bbf0145898b7b75ff757167ce9f3cadbe5987bc358fcb9d808
MD5 df791741066621b7a39adec850c1fa72
BLAKE2b-256 27c414d63dbff3d5e28d165ab53d63dda0c5bff41451991ba21429d46b4ff6b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kesav_chess_cli-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4363e11cedf9443be08f5e1c1c478f2d4c18574f50482623ff22a5207d2d3772
MD5 96ffa1e24aa64d1cce8ef071d09c29b3
BLAKE2b-256 9ac1f8e290d296b795250143381443bbee39866b7398c90844759e40766136e3

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