Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output is inconsistent #26

Open
ericrallen opened this issue Sep 27, 2023 · 0 comments
Open

Output is inconsistent #26

ericrallen opened this issue Sep 27, 2023 · 0 comments
Labels
question Further information is requested

Comments

@ericrallen
Copy link
Member

There's too much variability to when it returns an Array or a nested Array or an integer in the results field.

There should be some more consistency.

Maybe always stick to an Array for the results and have a computedResults that does any addition of modifiers?

4d6 is different from 4d6+4 which is different from sum(4d6).

It might be nice to rely on explicitly requiring a sum() call if you want to automatically the rolls together in case users want to verify the actual die rolls instead of just seeing the sum, but we also store the relevant roll data in the rolls array, so maybe reducing to a single number is best?

Or maybe it should be clearly defined when to expect an Array and when to expect a number?

@ericrallen ericrallen added the question Further information is requested label Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant