Dice.Roll

Static Method in Dice

Declaration

public static int Roll(int[] dice)

Description

Rolls a custom dice.

Parameters

diceThe numbered sides of the dice.

Returns

intA random number on the dice.

Overload

Declaration

public static int Roll(int[] dice, int n)

Description

Rolls a custom dice n amount of times.

Parameters

diceThe numbered sides of the dice.
nThe number of times to roll the dice.

Returns

intThe sum of the rolls.