Package featurecat.lizzie.rules
Class Zobrist
- java.lang.Object
-
- featurecat.lizzie.rules.Zobrist
-
public class Zobrist extends java.lang.Object
Used to maintain zobrist hashes for ko detection
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Zobrist
clone()
boolean
equals(java.lang.Object o)
int
hashCode()
void
toggleStone(int x, int y, Stone color)
Call this method to alter the current zobrist hash for this stonejava.lang.String
toString()
-
-
-
Method Detail
-
clone
public Zobrist clone()
- Overrides:
clone
in classjava.lang.Object
- Returns:
- a copy of this zobrist
-
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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-