예제 #1
0
파일: DeckRNG.java 프로젝트: smelc/SquidLib
 /**
  * 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
파일: DeckRNG.java 프로젝트: smelc/SquidLib
 /**
  * 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));
 }