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

Uploaded Python 3

File details

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

File metadata

  • Download URL: games_box-0.0.1rc5-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.1rc5-py3-none-any.whl
Algorithm Hash digest
SHA256 d369bab2e76f5351379405af3a88b9c578f392d8e09cdeecb6cceaa079f12f2c
MD5 838035f553fadb0ccfbf8476b5070b67
BLAKE2b-256 f77809ad3aaec6385a077383d6c2b9dc0dc713de16f063725d32f9397616f787

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