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.6.0.tar.gz (7.4 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.6.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: snakeeyes-spaceprius-0.6.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for snakeeyes-spaceprius-0.6.0.tar.gz
Algorithm Hash digest
SHA256 e22ad7ad63473aadb09e68341d8fe614cee9b8c1e8167619aecc4099597d7161
MD5 96b530348e176ed6fd2ddbb74c1d1cb3
BLAKE2b-256 b3fae4d48cae2b2494595c992a8f492046c5de5aa34641c0bcbbaaae099e6c92

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snakeeyes_spaceprius-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for snakeeyes_spaceprius-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b063b3a2b80826c48313cc727dd8465b57b2f5014245d148aeb1cb9a4b0d1cc
MD5 c8dc3e340ce18e20e1d11b9f5fea440d
BLAKE2b-256 06e20c1f8929e3aacf8dc91bce4879bb502d7a038e8b246369a1d08316bc55fc

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