Package net.sf.freecol.common
Class FreeColSeed
- java.lang.Object
-
- net.sf.freecol.common.FreeColSeed
-
public class FreeColSeed extends java.lang.Object
A wrapper for the pseudo-random number generator seed.
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_SEED
private static long
freeColSeed
The seed to use for pseudo-random number generators.private static boolean
seeded
Has a seed been set?
-
Constructor Summary
Constructors Constructor Description FreeColSeed()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
generateFreeColSeed()
Generate a new seed.static long
getFreeColSeed()
Gets the seed for the PRNG.static boolean
hasFreeColSeed()
Has the game been seeded?static boolean
setFreeColSeed(java.lang.String arg)
Sets the seed for the PRNG.
-
-
-
Field Detail
-
DEFAULT_SEED
public static final long DEFAULT_SEED
- See Also:
- Constant Field Values
-
freeColSeed
private static long freeColSeed
The seed to use for pseudo-random number generators.
-
seeded
private static boolean seeded
Has a seed been set?
-
-
Method Detail
-
getFreeColSeed
public static long getFreeColSeed()
Gets the seed for the PRNG.- Returns:
- The seed.
-
hasFreeColSeed
public static boolean hasFreeColSeed()
Has the game been seeded?- Returns:
- True if a seed has been set.
-
generateFreeColSeed
public static void generateFreeColSeed()
Generate a new seed.
-
setFreeColSeed
public static boolean setFreeColSeed(java.lang.String arg)
Sets the seed for the PRNG.- Parameters:
arg
- A string defining the seed.- Returns:
- True if the seed was set successfully.
-
-