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 start_cards, base_cards, basic_cards
from pyminion.players import BigMoney, Human
from pyminion.models.core import Game
# Initialize player and bot
human = Human()
bot = BigMoney()
players = [human, bot]
# Choose expansions to play with
expansions = [base_cards]
# Setup the game
game = Game(players, expansions, basic_cards, start_cards)
# Play game
game.start()
while not game.is_over():
bot.take_turn(game)
human.take_turn(game)
print("Winner: ", game.get_winner()
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.
Release files for pyminion 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyminion-0.1.4.tar.gz | 12.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyminion-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.4 kB
Release files / pyminion-0.1.4.tar.gz
| Download URL | pyminion-0.1.4.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa5958d8d91f35b890e0db41cc92096ac28ced4f13b75030249ef2f51cf067f8
|
|
BLAKE2b-256 checksum How to use checksums |
231c6e4dde1020748deff5e55b101282651c239017954ab5ed230e63799345ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5
|
Release files / pyminion-0.1.4-py3-none-any.whl
| Download URL | pyminion-0.1.4-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62cbe3d90750476f3c006291fde37044706c359bc80451d669fa5343fbbc84c0
|
|
BLAKE2b-256 checksum How to use checksums |
8e81e920580d570a28ad741a472b0141992569e95bef0b1e82bdcff563ec332f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5
|