Dice.NSided

Static Method in Dice

Declaration

public static int NSided(int n)

Description

Rolls an n-sided dice [1..n].

Parameters

nThe number of sides on the dice.

Returns

intA random number on an n-sided dice [1..n].

Overload

Declaration

public static int NSided(int n, int x)

Description

Rolls an n-sided dice [1..n] x amount of times.

Parameters

nThe number of sides on the dice.
xThe number of times to roll the dice.

Returns

intThe sum of the rolls.