Wiki
Clone wikiRogueSharp / RogueSharp.Random / README
RogueSharp.Random Namespace
Interfaces and classes for dealing with pseudo random number generation and dice. Includes predictable random number generation to be substituted in when running unit tests.
Classes
Class | Description |
---|---|
DotNetRandom | A class implementing IRandom which used for generating pseudo-random numbers using the System.Random class from the .Net framework |
GaussianRandom | A class implementing IRandom which uses the Box-Muller transformation to help generate Gaussian pseudo-random numbers |
KnownSeriesRandom | A class implementing IRandom which cycles through a specified series of integers each time the Next random number is asked for. |
MaxRandom | A class implementing IRandom which always returns the highest possible result |
MinRandom | A class implementing IRandom which always returns the lowest possible result |
RandomState | A class representing the state of a pseudo-random number generation algorithm at a point in time. This POCO (Plain Old C# Object) can be easily serialized and deserialized |
Singleton | The Singleton class is a public static class that holds the DefaultRandom generator. |
Interfaces
Interface | Description |
---|---|
IRandom | An Interface for pseudo-random number generators to implement. Useful when mocking out systems for tests, as the the random number generator can be swapped for a mock implimentation that returns known and expected values |
[9]: 2014-2016 Faron Bracy
Updated