Class Zobrist


  • public class Zobrist
    extends Object
    Used to maintain zobrist hashes for ko detection
    • Constructor Detail

      • Zobrist

        public Zobrist()
      • Zobrist

        public Zobrist​(long zhash)
    • Method Detail

      • clone

        public Zobrist clone()
        Overrides:
        clone in class 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 valid
        y - y coordinate -- must be valid
        color - color of the stone to alter (for adding or removing a stone color)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object