Beispiel #1
0
        public Rng.Seed nextSeed()
        {
            var seed    = currentSeed;
            var newSeed = seedRng.nextULong(out seedRng);

            // seed for Rng cannot be 0 due to its implementation.
            if (newSeed == 0)
            {
                newSeed = 42 /* what else could it be? */;
            }
            currentSeed = new Rng.Seed(newSeed);
            return(seed);
        }
Beispiel #2
0
 public RngSeeder(Rng.Seed currentSeed)
 {
     this.currentSeed = currentSeed;
     seedRng          = new Rng(currentSeed);
 }