Giter Site home page Giter Site logo

open_mafia_engine's Introduction

Open Mafia Engine

PyPI version Stable Release Docs

Test Python package "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:

Example CLI Application

open_mafia_engine's People

Contributors

anatoly-makarevich avatar maksim-charchuk avatar nowanilfideme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.