示例#1
0
 /**
  * Seeds this DeckRNG using the RandomnessSource it is given. Does not assign the RandomnessSource
  * to any fields that would affect future pseudo-random number generation.
  *
  * @param random will be used to generate a new seed, but will not be assigned as this object's
  *     RandomnessSource
  */
 public DeckRNG(RandomnessSource random) {
   this(random.nextLong());
 }
示例#2
0
 /**
  * Reseeds this DeckRNG using the RandomnessSource it is given. Does not assign the
  * RandomnessSource to any fields that would affect future pseudo-random number generation.
  *
  * @param random will be used to generate a new seed, but will not be assigned as this object's
  *     RandomnessSource
  */
 @Override
 public void setRandomness(RandomnessSource random) {
   setState(((long) random.next(32) << 32) | random.next(32));
 }