Skip to main content

A simple python dice library built with regex, currently in alpha

Project description

SnakeEyes PyPI version Build Status Codacy Badge Codacy Badge

SnakeEyes is a python dice library designed to be easily extensible. VERY MUCH WIP

Input

Input with snakeyes is done in form of

[quantity]d[sides][diceoperators][math]

Examples of valid input are:

1d20
4d6
1d20+5
(1d20+27)*16
(20+5)/12

Operators

"x" - Exploding dice, used in the form:

[diceroll]x[threshhold]

Any roll in the result set, meeting or exceeding the threshold, will trigger another roll to be made. Returns the set of rolls, with the addition of any exploded rolls.

">" - Inequality, used in the form:

[diceroll]>[threshold]

Any roll which exceeds the threshold will count as a success, returns a tuple with the rolls value, combined with a bool indicating whether it exceeded the threshold.

Project details


Download files

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

Source Distribution

snakeeyes-spaceprius-0.4.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

snakeeyes_spaceprius-0.4.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file snakeeyes-spaceprius-0.4.1.tar.gz.

File metadata

  • Download URL: snakeeyes-spaceprius-0.4.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for snakeeyes-spaceprius-0.4.1.tar.gz
Algorithm Hash digest
SHA256 3bd6a3df99884de3f88ae9bfd2aaaf130ecfb7ed0b937a438abbd95875ab8e51
MD5 e4b4208ba851d571913705a63c834093
BLAKE2b-256 c5ff146618aa186b52648e9666387728ab407746bf5ba52dcf8897dbf9dc276a

See more details on using hashes here.

File details

Details for the file snakeeyes_spaceprius-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: snakeeyes_spaceprius-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for snakeeyes_spaceprius-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 476eda1d38802f15e6f5f1baafd76c7a75d25b6148fe0210fe0357b68b2fc058
MD5 8824b1156682ec362ebe99f8182b236e
BLAKE2b-256 f8dd0a34516fb5e28159fd01cd89c11c8b893815925fb11d6d8da9c549c58d6c

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