Skip to main content

Module roller

Module roller 

Source
Expand description

Rolling dice from a Notation, following the D&D 5e (2014) rules.

The entry point is roll, which takes a RollType describing what to roll and how. Randomness comes from a generator passed in by the caller, so results can be made repeatable in tests by using a seeded generator.

Structs§

Roll
The result of a single roll.

Enums§

RollType
What to roll, and how.

Functions§

roll
Rolls dice as described by roll_type, using rng for randomness.