Package featurecat.lizzie.rules
Class Zobrist
- java.lang.Object
-
- featurecat.lizzie.rules.Zobrist
-
public class Zobrist extends java.lang.ObjectUsed to maintain zobrist hashes for ko detection
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Zobristclone()booleanequals(java.lang.Object o)inthashCode()static voidinit()voidtoggleStone(int x, int y, Stone color)Call this method to alter the current zobrist hash for this stonejava.lang.StringtoString()
-
-
-
Method Detail
-
clone
public Zobrist clone()
- Overrides:
clonein classjava.lang.Object- Returns:
- a copy of this zobrist
-
init
public static void init()
-
toggleStone
public void toggleStone(int x, int y, Stone color)Call this method to alter the current zobrist hash for this stone- Parameters:
x- x coordinate -- must be validy- y coordinate -- must be validcolor- color of the stone to alter (for adding or removing a stone color)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-