Wiki
Clone wikiRogueSharp / RogueSharp.Random / KnownSeriesRandom / Save
KnownSeriesRandomSave Method
Saves the current state of the number generator
Namespace: RogueSharp.Random
Assembly:
Syntax
public RandomState Save()
Return Value
Type: RandomState
A RandomState class representing the current state of this number generator
Implements
Examples
If you generated three random numbers and then called Save to store the state and followed that up by generating 10 more numbers before calling Restore with the previously saved RandomState the Restore method should return the generator back to the state when Save was first called. This means that if you went on to generate 10 more numbers they would be the same 10 numbers that were generated the first time after Save was called.
See Also
Reference
KnownSeriesRandom Class
RogueSharp.Random Namespace
[5]: 2014-2016 Faron Bracy
Updated