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

Uploaded Python 3

File details

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

File metadata

  • Download URL: games_box-0.0.1rc3-py3-none-any.whl
  • Upload date:
  • Size: 3.0 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.1rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 417c7655fcc9517b4695be05e76a928bd20591fdb726540c00df7e1b1cf3309f
MD5 b30a37a52a19153ac793a795ae5aa403
BLAKE2b-256 78867188e835a59b2c8f49c54f7cdc67999e24fe91d91441c070e33670f5f176

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