Class Zobrist


  • public class Zobrist
    extends java.lang.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 java.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 valid
        y - y coordinate -- must be valid
        color - color of the stone to alter (for adding or removing a stone color)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object