Name | chessbuilder JSON |
Version |
0.2.2
JSON |
| download |
home_page | None |
Summary | A chess game builder with customizable rules and mechanics |
upload_time | 2025-02-12 00:43:56 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
chess
game
pygame
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Chess Builder
A custom chess variant in Pygame featuring:
- **Gold Collection**: Pawns can accumulate gold.
- **Gold Transfer**: Gold may be transfered between friendly pieces with the same logic as captures.
- **Piece Purchases**: Spend gold to buy and place new pieces near your king.
- **Promotion Choices**: Pawns can promote with an interactive menu.
- **Optional Time Controls**: A built-in chess clock for timed games.
## Features
1. **Gold Accumulation**
- When it's your turn click a pawn you've already selected once to collect gold.
- Captured pieces add their accumulated gold to the capturing piece.
- To transfer gold click the transfering piece and then click the friendly piece you wish to recieve the gold. The recieving piece must be in a square that the transfering piece could move to.
2. **Purchases**
- Kings can open a purchase overlay by clicking on them again (when it's your turn).
- Spend gold to place new pieces next to your king if it does not leave you in check.
- Each piece has a cost (Pawn=1, Knight=3, Bishop=3, Rook=5, Queen=9).
3. **Promotion Menu**
- When a pawn reaches the last rank, a promotion menu appears so you can choose a new piece.
4. **Time Controls (Optional)**
- A chess clock can be activated, with multiple standard time options.
- Each clock runs only during its respective turn.
5. **Draw/Win Conditions**
- Threefold repetition and the 50-move rule trigger draws.
- Standard checkmate/stalemate detection for wins/losses.
## Installation
### Option 1: Install from PyPI (Recommended)
```bash
pip install chessbuilder
```
### Option 2: Install from Source
1. **Install Python** (3.7+ recommended)
2. **Clone the repository**:
```bash
git clone https://github.com/badgkat/ChessBuilder.git
cd ChessBuilder
```
3. **Install dependencies**:
```bash
pip install -r requirements.txt
```
### Development Setup
If you want to contribute or modify the code:
1. **Clone and install dev dependencies**:
```bash
git clone https://github.com/YourUsername/ChessBuilder.git
cd ChessBuilder
pip install -r requirements-dev.txt
```
2. **Install in editable mode**:
```bash
pip install -e .
```
3. **Run tests**:
```bash
pytest
```
## Running
Within the project directory, run:
```bash
python main.py
```
(or `python3 main.py` on some systems)
## Usage
- **Start New Game**
Press *New Game* in the pause menu (hit `Esc`). You may be prompted to select a time control if you've enabled the chess clock.
- **Moving Pieces**
Click a piece to see valid moves/captures.
- **Collecting Gold**
If the currently moving side is not in check, and you have a pawn selected, click the same pawn again to collect gold.
- **Buying Pieces**
Select your king, then click the king again to open the purchase overlay if you have enough gold.
- **Promotion**
When a pawn reaches the last rank, a promotion menu appears so you can choose a new piece.
- **Pausing/Exiting**
Press `Esc` to toggle the pause menu or exit the game.
## Controls
- **Esc**: Toggles the pause menu or closes overlays.
- **C**: Copies the move log to your clipboard.
- **Mouse Wheel** (over the right panel): Scrolls the move log.
## Chess Clock (Optional)
- At game start, select a time format (e.g. "3|2") if time control is enabled.
- Each player's clock runs only during their turn.
- When you end your turn, any increment is added to the side that just moved.
## Code Organization
- **`board.py`**: Contains constants for the board (dimensions, colors), plus the `Piece` class, and movement logic.
- **`clock.py`** *(optional)*: Implements a chess clock with starting time, increment, and methods for updating.
- **`game.py`**: Holds the primary `Game` class, controlling board state, gold mechanics, promotions, overlays, and drawing calls.
- **`main.py`**: The main entry point with the game loop (`main()`).
## To Do
- General UI beautifying.
- Adding Animations.
- Add an AI.
- Add non-local play.
## Known Limitations
- No castling. As the king must move to build a rook there is no situation where castling would be possible.
- En Passsant logic only covers standard piece movement, not placed pawns.
## Contributing
Pull requests and suggestions welcome! If you have ideas or new features, open an issue or submit a PR.
## License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).
See the [LICENSE](LICENSE) file for details.
---
*Enjoy building armies of gold-accumulating pieces and exploring this unique twist on classic chess!*
Raw data
{
"_id": null,
"home_page": null,
"name": "chessbuilder",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "chess, game, pygame",
"author": null,
"author_email": "BadgKat <badgkat@proton.me>",
"download_url": "https://files.pythonhosted.org/packages/b4/30/22f2d8c3d43bd0c4326a47ab3f3a85765883b2f983e9b1587b5ba0af30dc/chessbuilder-0.2.2.tar.gz",
"platform": null,
"description": "# Chess Builder\n\nA custom chess variant in Pygame featuring:\n- **Gold Collection**: Pawns can accumulate gold.\n- **Gold Transfer**: Gold may be transfered between friendly pieces with the same logic as captures.\n- **Piece Purchases**: Spend gold to buy and place new pieces near your king.\n- **Promotion Choices**: Pawns can promote with an interactive menu.\n- **Optional Time Controls**: A built-in chess clock for timed games.\n\n## Features\n\n1. **Gold Accumulation** \n - When it's your turn click a pawn you've already selected once to collect gold. \n - Captured pieces add their accumulated gold to the capturing piece.\n - To transfer gold click the transfering piece and then click the friendly piece you wish to recieve the gold. The recieving piece must be in a square that the transfering piece could move to. \n\n2. **Purchases** \n - Kings can open a purchase overlay by clicking on them again (when it's your turn). \n - Spend gold to place new pieces next to your king if it does not leave you in check. \n - Each piece has a cost (Pawn=1, Knight=3, Bishop=3, Rook=5, Queen=9).\n\n3. **Promotion Menu** \n - When a pawn reaches the last rank, a promotion menu appears so you can choose a new piece.\n\n4. **Time Controls (Optional)** \n - A chess clock can be activated, with multiple standard time options. \n - Each clock runs only during its respective turn.\n\n5. **Draw/Win Conditions** \n - Threefold repetition and the 50-move rule trigger draws. \n - Standard checkmate/stalemate detection for wins/losses.\n\n## Installation\n\n### Option 1: Install from PyPI (Recommended)\n```bash\npip install chessbuilder\n```\n\n### Option 2: Install from Source\n1. **Install Python** (3.7+ recommended)\n2. **Clone the repository**:\n ```bash\n git clone https://github.com/badgkat/ChessBuilder.git\n cd ChessBuilder\n ```\n\n3. **Install dependencies**:\n ```bash\n pip install -r requirements.txt\n ```\n\n### Development Setup\nIf you want to contribute or modify the code:\n\n1. **Clone and install dev dependencies**:\n ```bash\n git clone https://github.com/YourUsername/ChessBuilder.git\n cd ChessBuilder\n pip install -r requirements-dev.txt\n ```\n\n2. **Install in editable mode**:\n ```bash\n pip install -e .\n ```\n\n3. **Run tests**:\n ```bash\n pytest\n ```\n\n## Running\n\nWithin the project directory, run:\n\n```bash\npython main.py\n```\n\n(or `python3 main.py` on some systems)\n\n## Usage\n\n- **Start New Game** \n Press *New Game* in the pause menu (hit `Esc`). You may be prompted to select a time control if you've enabled the chess clock.\n- **Moving Pieces** \n Click a piece to see valid moves/captures. \n- **Collecting Gold** \n If the currently moving side is not in check, and you have a pawn selected, click the same pawn again to collect gold.\n- **Buying Pieces** \n Select your king, then click the king again to open the purchase overlay if you have enough gold.\n- **Promotion** \n When a pawn reaches the last rank, a promotion menu appears so you can choose a new piece.\n- **Pausing/Exiting** \n Press `Esc` to toggle the pause menu or exit the game.\n\n## Controls\n\n- **Esc**: Toggles the pause menu or closes overlays. \n- **C**: Copies the move log to your clipboard. \n- **Mouse Wheel** (over the right panel): Scrolls the move log.\n\n## Chess Clock (Optional)\n\n- At game start, select a time format (e.g. \"3|2\") if time control is enabled.\n- Each player's clock runs only during their turn.\n- When you end your turn, any increment is added to the side that just moved.\n\n## Code Organization\n\n- **`board.py`**: Contains constants for the board (dimensions, colors), plus the `Piece` class, and movement logic. \n- **`clock.py`** *(optional)*: Implements a chess clock with starting time, increment, and methods for updating. \n- **`game.py`**: Holds the primary `Game` class, controlling board state, gold mechanics, promotions, overlays, and drawing calls. \n- **`main.py`**: The main entry point with the game loop (`main()`).\n\n## To Do\n- General UI beautifying.\n- Adding Animations.\n- Add an AI.\n- Add non-local play.\n\n## Known Limitations\n\n- No castling. As the king must move to build a rook there is no situation where castling would be possible. \n- En Passsant logic only covers standard piece movement, not placed pawns. \n\n## Contributing\n\nPull requests and suggestions welcome! If you have ideas or new features, open an issue or submit a PR.\n\n## License\n\nThis project is licensed under the [MIT License](https://opensource.org/licenses/MIT). \nSee the [LICENSE](LICENSE) file for details.\n\n---\n\n*Enjoy building armies of gold-accumulating pieces and exploring this unique twist on classic chess!*\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A chess game builder with customizable rules and mechanics",
"version": "0.2.2",
"project_urls": {
"Bug Tracker": "https://github.com/badgkat/chessbuilder/issues",
"Homepage": "https://github.com/badgkat/chessbuilder",
"Repository": "https://github.com/badgkat/chessbuilder.git"
},
"split_keywords": [
"chess",
" game",
" pygame"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c8fa239042877646c85df354289047a29dceb8a78d1754fc1db9bf115dc22d76",
"md5": "3f5b049d6699436166ea81c408623cd1",
"sha256": "c3da0181658eeb262a985f172a64f3dcc25fee8aa12c5482df95c3025445ac28"
},
"downloads": -1,
"filename": "chessbuilder-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3f5b049d6699436166ea81c408623cd1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 36991,
"upload_time": "2025-02-12T00:43:54",
"upload_time_iso_8601": "2025-02-12T00:43:54.167312Z",
"url": "https://files.pythonhosted.org/packages/c8/fa/239042877646c85df354289047a29dceb8a78d1754fc1db9bf115dc22d76/chessbuilder-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b43022f2d8c3d43bd0c4326a47ab3f3a85765883b2f983e9b1587b5ba0af30dc",
"md5": "de3d01b7c645ca8b59db6357f62839f9",
"sha256": "92f32d767fbd83e38ca7df181dbfe0b677d9bf6554a359b64844dff995f55367"
},
"downloads": -1,
"filename": "chessbuilder-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "de3d01b7c645ca8b59db6357f62839f9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 39975,
"upload_time": "2025-02-12T00:43:56",
"upload_time_iso_8601": "2025-02-12T00:43:56.065063Z",
"url": "https://files.pythonhosted.org/packages/b4/30/22f2d8c3d43bd0c4326a47ab3f3a85765883b2f983e9b1587b5ba0af30dc/chessbuilder-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-12 00:43:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "badgkat",
"github_project": "chessbuilder",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "chessbuilder"
}