A Pythonic wargame engine for Guy Debord's Le Jeu de la Guerre
Project description
Pykrieg
A Pythonic wargame engine for Guy Debord's Le Jeu de la Guerre (A Game of War).
About
Pykrieg is a Python library that implements the complex rules of Guy Debord's strategic tabletop game, providing a clean, extensible API for developers to build custom interfaces, AI opponents, and analysis tools. The project is inspired by the successful python-chess library and follows similar design principles.
Planned Features
- Complete Game Engine: Full implementation of Debord's strategic game rules
- Clean API: Intuitive Pythonic interface modeled after python-chess
- Extensible Design: Easy to create custom variants, unit types, and victory conditions
- Format Support: Game record and position formats for saving/sharing games
- Console Interface: Interactive terminal-based gameplay (v0.2.0)
- Well-Tested: Comprehensive test suite with 89%+ code coverage
Installation
pip install pykrieg
For console interface with mouse support:
pip install pykrieg[console]
Quick Start
Console Interface (Casual Players)
Launch the interactive console game:
python -m pykrieg.console
Play using simple commands:
move 5,10 6,10- Move a unitattack 5,12- Attack a targetpass- Skip attack phaseend- End turnhelp- Show all commands
Python API (Developers)
from pykrieg import Board
# Create a board
board = Board()
# Add units
board.create_and_place_unit(5, 10, 'INFANTRY', 'NORTH')
# Move a unit
board.make_turn_move(5, 10, 6, 10)
# Attack
board.switch_to_battle_phase()
result = board.make_turn_attack(1, 12)
# End turn
board.end_turn()
Donations
If you like the project and want to support future development, consider donating!
License
This project is licensed under the GNU General Public License v3.0 - see LICENSE for details.
The GPL v3 license ensures that:
- The software remains free for all users
- Derivative works must be shared under the same license (copyleft)
- Commercial use is prohibited (requires separate commercial license)
- Users have the freedom to study, modify, and distribute the software
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pykrieg-0.2.1.tar.gz.
File metadata
- Download URL: pykrieg-0.2.1.tar.gz
- Upload date:
- Size: 103.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff8574dff9b9408a586a9935b5429839c0705da98d4497b1c05d98c0e7afad1d
|
|
| MD5 |
28fa9b75c36cc2f6c7bddd2b8bfa06d0
|
|
| BLAKE2b-256 |
0dd415cde0243508c319f7cd958dde9828d83e786ffd86b1231452f2b507db5e
|
File details
Details for the file pykrieg-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pykrieg-0.2.1-py3-none-any.whl
- Upload date:
- Size: 49.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0dbfb3719c68f7780e9013e8d18c0ed2e052778cb02db8846c6649ac531bdef
|
|
| MD5 |
97e9bae74cab161ecdccb422f5024a41
|
|
| BLAKE2b-256 |
5b2113decee78c3fca5eccf791b259f28c56ef80281bb92d541aed814ed33a7b
|