yatzy v1.0.0 Yatzy.Roll View Source

  • Generating new rolls
  • Rerolling all dice
  • Rerolling some dice
  • Enforcing game rules around re-rolls

Link to this section Summary

Link to this section Types

Link to this type

options()

View Source
options() :: [random: (... -> any()), reroll: [integer()]]
Link to this type

t()

View Source
t() :: %Yatzy.Roll{counter: integer(), dice: [integer()]}

Link to this section Functions

Link to this function

execute(roll, opts \\ [])

View Source
execute(roll :: t(), opts :: options()) :: t()

Rolls the dice