org.moyoman.util
Class Zobrist
java.lang.Object
|
+--org.moyoman.util.Zobrist
- All Implemented Interfaces:
- Serializable
- public class Zobrist
- extends Object
- implements Serializable
- See Also:
- Serialized Form
Field Summary |
private static long[][] |
blackRandom
The random numbers used for the black stones. |
private static long[][] |
whiteRandom
The random numbers used for the white stones. |
Method Summary |
static Long |
getValue(Stone[] stones)
Get the Zobrist hash value for the given board position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
blackRandom
private static long[][] blackRandom
- The random numbers used for the black stones.
whiteRandom
private static long[][] whiteRandom
- The random numbers used for the white stones.
Zobrist
public Zobrist()
getValue
public static Long getValue(Stone[] stones)
- Get the Zobrist hash value for the given board position.
- Parameters:
stones
- - An array of Stone objects which describes the board.
- Returns:
- A Long object.