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.
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
- Engine Protocol: UCI-like protocol for communication between engines and frontends
- Well-Tested: Comprehensive test suite with 85%+ code coverage
Installation
pip install pykrieg
Quick Start
import pykrieg
# Create a new game
game = pykrieg.Game()
# Get legal moves
for move in game.legal_moves:
print(move)
# Make a move
game.push(move)
# Check game state
print(game.is_game_over())
Documentation
Comprehensive documentation is available at docs/ covering:
- Basic usage
- API reference
- Creating custom variants
- Building AI engines
- Developing graphical interfaces
Development Status
This project is currently in Phase 1: Foundation and Core Infrastructure. See docs/prompt for the complete implementation plan.
Current Phase Goals
- Project setup and tooling
- Core data structures (board, territories, coordinate system)
- Game state management with FEN-like serialization
- Documentation framework setup
Project Structure
pykrieg/
├── src/pykrieg/ # Main library code
├── tests/ # Test suite
├── docs/ # Documentation
├── examples/ # Example implementations
└── scripts/ # Utility scripts
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License - see LICENSE for details.
Acknowledgments
- Inspired by Guy Debord's Le Jeu de la Guerre
- Modeled after the python-chess library
- Built following the implementation plan outlined in docs/prompt
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.0.1.tar.gz.
File metadata
- Download URL: pykrieg-0.0.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
400a3ad38e649c1e1c3dee7dd82d24c2553fd4194757fce91eafd2d00bafe771
|
|
| MD5 |
380c9798fb113278060931eaa5fd5baa
|
|
| BLAKE2b-256 |
4b75411240eb2758c8ffb948f8f8f91299af34ea5c38dd34a2162f2c53184de7
|
File details
Details for the file pykrieg-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pykrieg-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee61ae1d95f089dde05cf1649d253e5ba347b2c163311b1aac185f45153f0d7f
|
|
| MD5 |
8a264b4910667786ad63d65e57b96023
|
|
| BLAKE2b-256 |
83cd4f6d44b796ff142d671951381e966461dbd503c953fc758e6c63f83e27c0
|