Class MaxRandom
A class implementing IRandom which always returns the highest possible result
Inheritance
System.Object
MaxRandom
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: RogueSharp.Random
Assembly: RogueSharp.dll
Syntax
public class MaxRandom : IRandom
Methods
| Improve this Doc View SourceNext(Int32)
Gets the next integer in the series which will always be maxValue
Declaration
public int Next(int maxValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxValue | Inclusive maximum result which is always returned in this case |
Returns
Type | Description |
---|---|
System.Int32 | Returns the integer maxValue |
Next(Int32, Int32)
Gets the next integer in the series which will always be maxValue
Declaration
public int Next(int minValue, int maxValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | minValue | Inclusive minimum result which is never used in this case |
System.Int32 | maxValue | Inclusive maximum result which is always returned in this case |
Returns
Type | Description |
---|---|
System.Int32 | Returns the integer maxValue |
Restore(RandomState)
Restores the state of the generator which is essentially a no-op for this generator
Declaration
public void Restore(RandomState state)
Parameters
Type | Name | Description |
---|---|---|
RandomState | state | Not used |
Save()
Save the current state of the generator which is essentially a no-op for this generator
Declaration
public RandomState Save()
Returns
Type | Description |
---|---|
RandomState | A new RandomState object |