Open Mafia Engine - a framework for mafia/werewolf games.
Project description
Open Mafia Engine
The Open Mafia Engine is a flexible, open-source game engine for Mafia-like games.
See the Wikipedia article for information on what Mafia/Werewolf is.
The Open Mafia Engine actually allows a much broader type of game to be played, with custom roles and very intricate "setups". Most of these custom roles come from either "real-life" games or online forums such as MafiaScum and Bay12Games Mafia Subforum.
Features
- Event-based architecture, which allows for very complex interactions.
- Many built-in abilities, victory conditions, etc. (Not "many" yet, but we're working on it!)
- Games are defined declaratively or using an parametrized GameBuilder.
- Open source & extensible.
Installing
Install the latest stable version, with recommended dependencies, via pip:
pip install open_mafia_engine[recommended]
See the dev docs to install for local development (using Poetry).
Getting started
This example starts a 5-player "test" mafia game (1 mafioso vs 4 townies):
import open_mafia_engine.api as mafia
builder = mafia.GameBuilder.load("test")
players = ['Alice', 'Bob', 'Charlie', 'Dave', 'Eddie']
game = builder.build(players)
Example Application
This repository includes an example text-based Mafia app, runnable like:
mafia-cli
# or
python -m open_mafia_engine.example.cli
This is what the UI looks like:
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
Hashes for open-mafia-engine-0.5.0b2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 167914439fefa90dbcb503d1d966f23c0856c01273e766523e4e493a099791ae |
|
MD5 | 72c33a75f80f2c5b7aa715de4d5c4173 |
|
BLAKE2b-256 | d6f06460063aa8ef835d1df41f4f262f595dd0ec2a011e25a78f7c02308def36 |
Hashes for open_mafia_engine-0.5.0b2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16f102d2e0c1c69a33f50988577ba16ec5b8ed5ee08c522204ad9c1ebd303ac2 |
|
MD5 | 8c5415e4b99faa437f66f13814db55b7 |
|
BLAKE2b-256 | fa0955171328ae70182a17bb2d8d57928325d47ab75c42223feaf30bf7f8acef |