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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for console_chess_imandyr-1.6.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37d56305df3f8c0ebe7ec0ab7d93e1fb155468d107833502d6a82aa98e977064 |
|
MD5 | 304dfeafb55ee5856dfcf533e44fe7d4 |
|
BLAKE2b-256 | c5a4b9d7c9dcd8fbe55f81bb018d05b8987c97805a1d99145e7cc311abae62fd |
Close
Hashes for console_chess_imandyr-1.6.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08dcf4e0d4a5c32efefcfc2e31caf99fba14805640f442c6f7f4baccdf1b8e5c |
|
MD5 | dc51cb16c1adef74a987c5e33ce02df0 |
|
BLAKE2b-256 | 85a482bfd0fc2ce460975a15a799b64e0a288695bce9065286b4e01335d49482 |