com.threerings.puzzle.data
Class Board.BoardRandom

java.lang.Object
  extended by java.util.Random
      extended by com.threerings.puzzle.data.Board.BoardRandom
All Implemented Interfaces:
Serializable, Cloneable
Enclosing class:
Board

protected static class Board.BoardRandom
extends Random
implements Cloneable

Used to generate random numbers.

See Also:
Serialized Form

Field Summary
protected  boolean _haveNextNextGaussian
           
protected  double _nextNextGaussian
           
protected  long _seed
          The internal state related to generating random numbers.
 
Constructor Summary
Board.BoardRandom(long seed)
           
 
Method Summary
 Board.BoardRandom clone()
           
protected  int next(int bits)
           
 void nextBytes(byte[] bytes)
           
 double nextDouble()
           
 double nextGaussian()
           
 int nextInt(int n)
           
 void setSeed(long seed)
           
 
Methods inherited from class java.util.Random
nextBoolean, nextFloat, nextInt, nextLong
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_seed

protected long _seed
The internal state related to generating random numbers.


_nextNextGaussian

protected double _nextNextGaussian

_haveNextNextGaussian

protected boolean _haveNextNextGaussian
Constructor Detail

Board.BoardRandom

public Board.BoardRandom(long seed)
Method Detail

setSeed

public void setSeed(long seed)
Overrides:
setSeed in class Random

next

protected int next(int bits)
Overrides:
next in class Random

nextBytes

public void nextBytes(byte[] bytes)
Overrides:
nextBytes in class Random

nextInt

public int nextInt(int n)
Overrides:
nextInt in class Random

nextDouble

public double nextDouble()
Overrides:
nextDouble in class Random

nextGaussian

public double nextGaussian()
Overrides:
nextGaussian in class Random

clone

public Board.BoardRandom clone()
Overrides:
clone in class Object