Simple dice rolling library.
The main entrypoint to the library is the diceRolls.Parse function:
func Parser(expression string) (Result, error)
Result
has to methods:
Result.Value() int
- evaluate parsed expression and roll dices. Dice are rolled on each call.Result.Description(detailed bool) string
- return string representation of expression. Ifdetailed == true
it will include dice results in square brackets.