Metadata-Version: 2.1
Name: open-mafia-engine
Version: 0.5.0a4
Summary: Open Mafia Engine - a framework for mafia/werewolf games.
Home-page: https://open-mafia-engine.readthedocs.io/en/latest/
License: Apache-2.0
Keywords: mafia,werewolf
Author: Open Mafia Team
Author-email: openmafiateam@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Games/Entertainment :: Board Games
Classifier: Topic :: Games/Entertainment :: Role-Playing
Provides-Extra: bay12
Provides-Extra: dev
Provides-Extra: docs
Provides-Extra: pygments
Provides-Extra: ruamel
Provides-Extra: test
Requires-Dist: beautifulsoup4 (>=4.9.3,<5.0.0); extra == "bay12"
Requires-Dist: cloudpickle (>=1.6.0,<2.0.0)
Requires-Dist: flake8 (>=3.9.2,<4.0.0); extra == "dev"
Requires-Dist: fuzzywuzzy (>=0.18.0,<0.19.0)
Requires-Dist: makefun (>=1.11.3,<2.0.0)
Requires-Dist: mkdocs (>=1.1.2,<2.0.0); extra == "docs"
Requires-Dist: mypy (>=0.800,<0.801); extra == "dev"
Requires-Dist: pydantic (>=1.7.3,<2.0.0)
Requires-Dist: pydantic-yaml (>=0.2.3,<0.3.0)
Requires-Dist: pygments (>=2.9.0,<2.10.0); extra == "pygments"
Requires-Dist: pytest (>=6.2.4,<7.0.0); extra == "dev" or extra == "test"
Requires-Dist: requests (>=2.25.1,<3.0.0); extra == "bay12"
Requires-Dist: ruamel.yaml (>=0.17.4,<0.18.0); extra == "ruamel"
Requires-Dist: sortedcontainers (>=2.3.0,<3.0.0)
Project-URL: Documentation, https://open-mafia-engine.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/open-mafia/open_mafia_engine
Description-Content-Type: text/markdown

# Open Mafia Engine

[![PyPI version](https://badge.fury.io/py/open-mafia-engine.svg)](https://badge.fury.io/py/open-mafia-engine) [![Test Python package "open_mafia_engine"](https://github.com/open-mafia/open_mafia_engine/actions/workflows/python-testing.yml/badge.svg)](https://github.com/open-mafia/open_mafia_engine/actions/workflows/python-testing.yml)

The Open Mafia Engine is a flexible, open-source game engine for Mafia-like games.

See the [Wikipedia article](https://en.wikipedia.org/wiki/Mafia_%28party_game%29)
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](https://wiki.mafiascum.net/index.php?title=Main_Page) and
[Bay12Games Mafia Subforum](http://www.bay12forums.com/smf/index.php?board=20.0).

## Features

- Event-based architecture, which allows for very complex interactions.
- Many built-in abilities, victory conditions, etc.
  (This is a lie, but we're working on it!)
- Games are defined declaratively or using an parametrized GameBuilder.
- Open source & extensible, with a plugin system in the works.

## Installing

Install the latest stable version via pip:

`pip install open_mafia_engine`

See the [dev docs](docs/development/installing_dev.md) to install for local
development (using Poetry).

## Getting started

This example starts a 5-player "test" mafia game (1 mafioso vs 4 townies):

```python
import open_mafia_engine.api as mafia

builder = mafia.GameBuilder.load("test")
players = ['Alice', 'Bob', 'Charlie', 'Dave', 'Eddie']
game = builder.build(players)
```

Actually running commands in the engine is pretty complicated for now.
We're working to improve the experience.

See `playground.py` in the repository for an example game.

