DiceRoller class

A dice roller for M dice of N sides (e.g. 2d6). A roll returns a list of ints.

Constructors

DiceRoller([Random? r])
Constructs a dice roller

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
roll(int ndice, int nsides, [String msg = '']) RollResult
Roll ndice of nsides and return results as list.
rollFudge(int ndice) RollResult
Roll N fudge dice, return results
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

defaultExplodeLimit → const int
default limit to # of times dice rolls can explode (100)
maxDice → const int
maximum dice to allow to be rolled (1k)
maxSides → const int
maximum sides of dice (100k)
minDice → const int
minimum dice to roll (0)
minSides → const int
minimum sides of dice (2)