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 games_box.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.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: games_box-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9a9b68b7e492973a62d771a4764fa9f7f41aa34ade0e268a13cb4dae2d611b43
MD5 1848691bd4acd311e230b9cac2e05186
BLAKE2b-256 1deed3ae4a74d96833e924bc3594e60787acd39141cacbda32a69dddc6cee01b

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