Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • freeColSeed

        private static long freeColSeed
        The seed to use for pseudo-random number generators.
      • seeded

        private static boolean seeded
        Has a seed been set?
    • Constructor Detail

      • FreeColSeed

        public FreeColSeed()
    • 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.