random Dice - tadashi9e/gmp4pony GitHub Wiki
A simple dice roller.
class ref DiceInitialise with a random number generator.
new ref create(
from: Random ref)
: Dice ref^- from: Random ref
- Dice ref^
var r: Random ref
Return the sum of count rolls of a die with the given number of sides.
The die is numbered from 1 to sides. For example, count = 2 and
sides = 6 will return a value between 2 and 12.
fun ref apply(
count: U64 val,
sides: U64 val)
: U64 val- U64 val