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.7.1.tar.gz (7.7 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.7.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: snakeeyes-spaceprius-0.7.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for snakeeyes-spaceprius-0.7.1.tar.gz
Algorithm Hash digest
SHA256 e400c635315cb6f175b05c0eece2e1c46355a1ec9fa00b055b8c65f02141d9d4
MD5 55ddaa8dcd6291f9e4bebf905dedefd1
BLAKE2b-256 8cfe6b7ce3127f3c0ef2a3a4cf85eb312240c8847e5a8ad4168edba90da52add

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snakeeyes_spaceprius-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 04d2733a166ab7b476aa0e44b3ec831aeedad11ee3a68dceb33ef9d188ce950d
MD5 a54c17466fd14c75a2203ca500c426fb
BLAKE2b-256 9f369f4b319d064cb2e200d0bbf7e43f8262d42761810a1d8f18906ed8f51537

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