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

Uploaded Python 3

File details

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

File metadata

  • Download URL: games_box-0.0.1rc1-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.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 2950c1df6a380a77e53e07a693938155e70b1006067abb3ec3f2cfc1a8d237f2
MD5 1fcfa1ed9e848e23798193f62a0f8e7d
BLAKE2b-256 32ed4c512d63c1743410ef613f0bb4115fe22bd36e92265242c962b2ab295cac

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