RogueSharp
Show / Hide Table of Contents

Class MaxRandom

A class implementing IRandom which always returns the highest possible result

Inheritance
System.Object
MaxRandom
Implements
IRandom
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 Source

Next(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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

Implements

IRandom
  • Improve this Doc
  • View Source
RogueSharp © 2014-2020 Faron Bracy
Back to top