abelsiqueira / DiceRolls.jl

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

Make roll_str work with multiple different dice #7

Open abelsiqueira opened 3 years ago

abelsiqueira commented 3 years ago

Currently works for roll"3d4". Needs to work for roll"1d6+1d4" as well.

satyabansahoo2000 commented 3 years ago

@abelsiqueira The issue is with only 1 number of rolls. All others are working fine. I tried every possible combinations with 1 number of rolls, but all failed. Error is due to the condition.

abelsiqueira commented 3 years ago

Ah sorry, I made a mistake, it should read roll"1d6+4d4", or something like that. I'm gonna edit the description.

satyabansahoo2000 commented 3 years ago

@abelsiqueira it works perfectly for multiple different dice too. Histogram

abelsiqueira commented 3 years ago

I'm specifically talking about the untagged roll_str https://github.com/abelsiqueira/DiceRolls.jl/blob/f45828cb56be6cd6645e2afb69b1aca4150c0735/src/DiceRolls.jl#L35 not the direct usage.

satyabansahoo2000 commented 3 years ago

@abelsiqueira can you please provide an example of untagged roll?

abelsiqueira commented 3 years ago

Sorry, what I meant was that the current tagged version of DiceRolls (0.1.0) does not have roll_str, only the latest on branch main. I just tagged a new version (0.2.0) so it should take about 30 minutes for the Registrator to merge it.