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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8ff308ef9b717b5a5085ebfc5a27097747c02d3b3a662c2bc75e8dd6785e84d |
|
MD5 | e4a816fd6a2cbf6ff844d6f6fc39aaad |
|
BLAKE2b-256 | 8fd993954f907f7f4721c4d21639107abc0c939de60e99fdaca06fd526b8b15e |
Close
Hashes for console_chess_imandyr-1.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35fb98d9df0b0d6cca11e83660682047f1afb25c045c1f15b1e106b7ce1c7bd8 |
|
MD5 | d97d639d6eba82269db67aa243a3bdd1 |
|
BLAKE2b-256 | 0128a674e95836e0760d10ccf82a7ac5c99dcd4cbb65212fff4dcbc3e16df73c |