diced

Types

pub type Dice {
  Basic(amount: Int, value: Int, modifiers: List(Modifier))
  Fate(amount: Int, modifiers: List(Modifier))
  Number(value: Int, modifiers: List(Modifier))
}

Constructors

  • Basic(amount: Int, value: Int, modifiers: List(Modifier))
  • Fate(amount: Int, modifiers: List(Modifier))
  • Number(value: Int, modifiers: List(Modifier))
pub opaque type DiceError
pub type Modifier {
  KeepHighest(Int)
  KeepLowest(Int)
  DropHighest(Int)
  DropLowest(Int)
  Reroll(Int)
  RecursiveReroll(Int)
  Explode(Int)
  Minimum(Int)
  Maximum(Int)
}

Constructors

  • KeepHighest(Int)
  • KeepLowest(Int)
  • DropHighest(Int)
  • DropLowest(Int)
  • Reroll(Int)
  • RecursiveReroll(Int)
  • Explode(Int)
  • Minimum(Int)
  • Maximum(Int)

Values

pub fn parse(string string: String) -> Result(Dice, DiceError)
Search Document