Class Zobrist


  • public class Zobrist
    extends java.lang.Object
    Used to maintain zobrist hashes for ko detection
    • Constructor Summary

      Constructors 
      Constructor Description
      Zobrist()  
      Zobrist​(long zhash)  
    • 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 stone
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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
      • 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