Skip to main content

Implementation of chess game which can be played through console.

Project description

Console-Chess

My implementation of chess game which can be played through console. Run main.py or Menu.start() to start application.

Overview:

  • console_chess.base:

    Containing classes Table, Player, Figure and exception classes.
  • console_chess.figures:

    Containing figures classes Pawn, Rook, Bishop, Knight, Queen, king and some functions for them.
  • console_chess.bot:

    Containing Bot, EasyBot, NormalBot, HardBot and some functions for them.
  • console_chess.game:

    Containing Difficulty, ChessSet, Game, PvP, PvC, CvC and Menu.

Instruction:

  • The Table contains Figure objects in certain positions inside.
  • Figures are a Figure subclasses, which have their unique rules by which their moves are validated.
  • figures are owned by some Players, which can move their figures from one position on table to another using Player.move() method.
  • Player and Figure moves must be valid from chess rules perspective, or else it will raise exception.
  • Bots are subclasses of Player, which can make moves by themselves using Bot.auto_move() method.
  • PvP, PvC and CvC are subclasses of a Game, which performs turn-based gameplay of chess through console. Use .play() method to start the game.
  • The Menu provides interface to choose game mode and difficulty. Run Menu.start() to start a menu.

Requirements:

  • OS:

    • No OS specific tools were used, so it should work anywhere Python runs.
  • Python interpreter version:

    • 3.10
  • Third party packages:

    • pytest==8.0.0 (Only for tests, so most of the code can be used without it.)

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

console_chess_imandyr-1.6.5.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

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

console_chess_imandyr-1.6.5-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file console_chess_imandyr-1.6.5.tar.gz.

File metadata

  • Download URL: console_chess_imandyr-1.6.5.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for console_chess_imandyr-1.6.5.tar.gz
Algorithm Hash digest
SHA256 37d56305df3f8c0ebe7ec0ab7d93e1fb155468d107833502d6a82aa98e977064
MD5 304dfeafb55ee5856dfcf533e44fe7d4
BLAKE2b-256 c5a4b9d7c9dcd8fbe55f81bb018d05b8987c97805a1d99145e7cc311abae62fd

See more details on using hashes here.

File details

Details for the file console_chess_imandyr-1.6.5-py3-none-any.whl.

File metadata

File hashes

Hashes for console_chess_imandyr-1.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 08dcf4e0d4a5c32efefcfc2e31caf99fba14805640f442c6f7f4baccdf1b8e5c
MD5 dc51cb16c1adef74a987c5e33ce02df0
BLAKE2b-256 85a482bfd0fc2ce460975a15a799b64e0a288695bce9065286b4e01335d49482

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