godfather

A CLI for running games of Mafia.


License
Other
Install
pip install godfather==0.3

Documentation

🐴 Godfather

A tool for running games of Mafia over email. Uses the mafia package as its resolver.

Installing

Install Godfather:

sudo pip3 install --upgrade godfather

Set up Mailgun, then install your Mailgun API key:

mkdir -p ~/.config/godfather
echo YOUR_MAILGUN_API_KEY > ~/.config/godfather/mailgun_key.txt

Usage

Normal usage:

# Create game directory.
mkdir my_game
cd my_game

# Create a template setup.py.
godfather init

# Edit setup.py to configure your game.
nano setup.py

# Run the game. Game state is saved in game.pickle.
godfather run

Other commands:

# View the game log so far.
godfather log

# Resolve the current phase immediately.
godfather resolve

# Restore the game state from a backup.
godfather restore --backup ~/mafia-game/backups/my_backup.pickle

Contributing

Install dependencies:

sudo pip3 install --upgrade callee click flask jinja2 mafia pluginbase pytest pytz requests termcolor

Install pre-commit hooks:

scripts/install_git_hooks.sh

Run tests:

# Run all unit tests.
pytest

# Run Mailgun integration tests.
pytest -m mailgun

TODO

  • Add full-game integration test
  • Add mail push