Class Zobrist

java.lang.Object
featurecat.lizzie.rules.Zobrist

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

    • Zobrist

      public Zobrist()
    • Zobrist

      public Zobrist(long zhash)
  • Method Details

    • clone

      public Zobrist clone()
      Overrides:
      clone in class 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(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object