Skip to main content

Dominion but make it python

Project description

Pyminion

Pyminion is a library for executing and analyzing games of Dominion. At its core, pyminion implements the rules and logic of Dominion and provides an API to interact with the game engine. In addition, it enables interactive games through the command line and simulation of games between bots.

Table of Contents

Getting Started

Pyminion requires Python 3.8 and can easily be installed through pypi

python3 -m pip install pyminion

Usage

To play a game against a bot through the command line:

from pyminion.expansions.base import base_cards, basic_cards, start_cards
from pyminion.game import Game
from pyminion.bots.big_money import BigMoney
from pyminion.players import Human

# Initialize player and bot
human = Human()
bot = BigMoney()

# Setup the game
game = Game(
    players=[human, bot],
    expansions=[base_cards],
    basic_cards=basic_cards,
    start_cards=start_cards,
)

# Play game
game.play()
game.get_stats()

Support

Please open an issue for support.

Contributing

The most welcome contributions would be to add more cards from the base set of Dominion or to create new bots that perform better than basic big money strategy. Check the open issues to get a sense of what of is currently being worked on.

If you would like to contribute, please create a branch, add commits, and open a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyminion-0.1.5.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyminion-0.1.5-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file pyminion-0.1.5.tar.gz.

File metadata

  • Download URL: pyminion-0.1.5.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pyminion-0.1.5.tar.gz
Algorithm Hash digest
SHA256 0de78e4448c8b99ee21aeb1609c943119cce505d6f2f5c1392831ee8f0e15432
MD5 7eb56d95a2d12c08cd0a472f36e4c571
BLAKE2b-256 04e9eb1d0a98c99f5e990520da5b5c929c8da11b599d237d2354654efd9434a7

See more details on using hashes here.

File details

Details for the file pyminion-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: pyminion-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for pyminion-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 dfb5ddae1ecd692267277ab397a214da5987b15076909f6cf8f611b98b06a5fb
MD5 3d690b87007c63bbffb23e6dd2471336
BLAKE2b-256 6d60c45503441fc3008a5a5a59cfe950483c4dffce72f3d3dde4f364c8aada54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page