public class NESRandom
extends java.util.Random
implements java.lang.Cloneable
| Constructor and Description |
|---|
NESRandom()
Creates a new pseudorandom number generator.
|
NESRandom(long seed)
Creates a new pseudorandom number generator, starting with the
specified seed, using
setSeed(seed);. |
| Modifier and Type | Method and Description |
|---|---|
NESRandom |
clone()
Creates a clone of this object based on its current seed.
|
long |
getSeed()
Returns the current state of the seed, can be used to clone the
object
|
void |
setSeed(long seed)
Sets the seed for this pseudorandom number generator.
|
public NESRandom()
setSeed(System.currentTimeMillis());.System.currentTimeMillis()public NESRandom(long seed)
setSeed(seed);.seed - the initial seedpublic void setSeed(long seed)
setSeed in class java.util.Randomseed - the new seedpublic long getSeed()
public NESRandom clone()
clone in class java.lang.Object