예제 #1
0
        public static InitableRandom Get(SeedEnum seed_enum)
        {
            if (!dict.ContainsKey(seed_enum.ToString()))
            {
                throw new Exception(seed_enum.ToString() + "is not declared");
            }

            return(dict[seed_enum.ToString()]);
        }
예제 #2
0
 public ExtendRandom Get(SeedEnum seed_enum)
 {
     if (!this.RandomDictionary.ContainsKey(seed_enum))
     {
         throw new Exception(seed_enum.ToString() + " is not registered");
     }
     return(this.RandomDictionary[seed_enum]);
 }
예제 #3
0
        public static void Declare(SeedEnum seed_enum, int seed)
        {
            InitableRandom rand = new InitableRandom(seed);

            dict[seed_enum.ToString()] = rand; //
        }