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 core game engine. In addition, it enables interactive games through the command line and simulation of games between bots.
Table of Contents
Installation
pip install pyminion
Usage
To play a game against a bot:
from pyminion.expansions.base import start_deck, core_supply, kingdom_cards
from pyminion.players import BigMoney, Human
from pyminion.models.core import Game, Supply
# Initialize player and bot
human = Human(deck=start_deck)
bot = BigMoney(deck=start_deck)
# Setup the game
supply = Supply(piles=core_supply + kingdom_cards)
game = Game(players=[bot, human], supply=supply)
# 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 what needs to be done.
If you would like to contribute, please create a branch, add commits, and open a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyminion-0.1.2.tar.gz.
File metadata
- Download URL: pyminion-0.1.2.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f078f174d7ee3f7c5e817914e7d95d8d58d1df10e0d365932e1d776b83bc24aa
|
|
| MD5 |
2da6208db435475da936714246c4b6b3
|
|
| BLAKE2b-256 |
316269f19eb2aca94939f03577686b88abb4f907b1df1fef818d8c1119e525c6
|
File details
Details for the file pyminion-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pyminion-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
795df7466a880f4e2a91306079649f25062d269757ebe8aed380ca0b8a84e971
|
|
| MD5 |
07e1e49a7213bd8a94ad41e160845228
|
|
| BLAKE2b-256 |
4ecc29a54a9b21bfae25a90b0fbefd2ab3ef06cc7e8dfaefc5f46b1349fca39b
|