Source/Rollers/DotNetDieRoller.cs
/// <summary>
/// Rolls a die with the given amount of sides, returning
/// a random number based on the number of potential sides
/// </summary>
/// <param name="sides">The number of sides of the dice to roll</param>
/// <returns>A number between 1 and the number of sides, or 0 if there are no sides</returns>
Rolls a die with the given amount of sides, returning
a random number based on the number of potential sides
Rolls a die with the given amount of sides returning a random number based on the number of potential sides
public virtual int RollDie(int sides)
		{
			if (sides == 0)
			{
				return 0;
			}
			return _random.Next(0, sides) + 1;
		}
public virtual int RollDie ( int sides ) { if ( sides == 0 ) { return 0 ; } return _random . Next ( 0 , sides ) + 1 ; }
Rolls a die with the given amount of sides, returning
a random number based on the number of potential sides
Rolls a die with the given amount of sides returning a random number based on the number of potential sides
A number between 1 and the number of sides, or 0 if there are no sides
A number between 1 and the number of sides or 0 if there are no sides
sides
int
The number of sides of the dice to roll
The number of sides of the dice to roll