Skip to main content

Various games tools

Project description

Games Box

Build and Install

Standalone Executable

pip install -r requirements-dev.txt
pyinstaller game_box.py --onefile

Build & Install Library Locally

python setup.py sdist
pip install /dist/games-box-VERSION.tar.gz

Install Library via pip

pip install games-box

Usage

Standalone Executable

Dice

A simple interface for rolling dice. Each die is given a random, human-readable name. You may also give your own names to improve readability with large dice pools.

Roll a single die giving the number of sides and an optional name.

game_box.exe roll-die --sides=6
>> d6-PINK-FOX: 3

Roll multiple dice giving a semi-colon separated list of dice.

game_box.exe roll-dice --dice="4;6"
>> d4-WHITE-MOUSE: 3
>> d6-BLUE-RABBIT: 1
>> Total: 4

Optionally, include your own name with each die.

game_box.exe roll-dice --dice="4-My d4;6-My d6"
>> My d4: 1
>> My d6: 2
>> Total: 3

Library

from dice.dice import Die, DicePool
my_d4 = Die(4, "My d4")
my_d6 = Die(6, "My d6")

my_dice_pool = DicePool([my_d4, my_d6])
print(my_dice_pool.roll())

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

games_box-0.0.1rc2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file games_box-0.0.1rc2-py3-none-any.whl.

File metadata

  • Download URL: games_box-0.0.1rc2-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for games_box-0.0.1rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 26dd255726148649e9e26846397cfd856b746aae51b3e26c28d92d7a7e1e435e
MD5 2b162300d156e964c85a8333ba88e45f
BLAKE2b-256 7957ee8c3e038a5ade2f63652bc1eb35984574e6dc8d14d8f7faa769dad0f23f

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