abelsiqueira / DiceRolls.jl

Julia package defining dice and operations with them
Other
9 stars 4 forks source link

Create a parseable *_str version #4

Closed abelsiqueira closed 3 years ago

abelsiqueira commented 3 years ago

For instance

macro r_str(str)
    # Parse the string and call appropriate functions
end

so that it's easier to run with bots, for instance.

Examples of rolls that would be interesting:

r"2#1d20+6" # Rolls 1d20+6 twice
r"2d20kh1" # Rolls 2d20 and keeps highest
r"Adv 1d20+6" # Rolls  1d20+6 twice and keeps highest (same as `kh1`).

cf. @jualns @Lucas-Akio

Moelf commented 3 years ago

btw:

Ineligible Repository Your PR was submitted to a repository that is not participating in Hacktoberfest. Maintainers of the repository can add the "hacktoberfest" topic to their repository if they wish to participate.

abelsiqueira commented 3 years ago

The topic was added, let me know if it works, and thanks again.