Enum Stone

java.lang.Object
java.lang.Enum<Stone>
featurecat.lizzie.rules.Stone
All Implemented Interfaces:
Serializable, Comparable<Stone>, java.lang.constant.Constable

public enum Stone extends Enum<Stone>
  • Enum Constant Details

    • BLACK

      public static final Stone BLACK
    • WHITE

      public static final Stone WHITE
    • EMPTY

      public static final Stone EMPTY
    • BLACK_RECURSED

      public static final Stone BLACK_RECURSED
    • WHITE_RECURSED

      public static final Stone WHITE_RECURSED
    • BLACK_GHOST

      public static final Stone BLACK_GHOST
    • WHITE_GHOST

      public static final Stone WHITE_GHOST
    • DAME

      public static final Stone DAME
    • BLACK_POINT

      public static final Stone BLACK_POINT
    • WHITE_POINT

      public static final Stone WHITE_POINT
    • BLACK_CAPTURED

      public static final Stone BLACK_CAPTURED
    • WHITE_CAPTURED

      public static final Stone WHITE_CAPTURED
  • Method Details

    • values

      public static Stone[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Stone valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • opposite

      public Stone opposite()
      used to find the opposite color stone
      Returns:
      the opposite stone type
    • recursed

      public Stone recursed()
      used to keep track of which stones were visited during removal of dead stones
      Returns:
      the recursed version of this stone color
    • unrecursed

      public Stone unrecursed()
      used to keep track of which stones were visited during removal of dead stones
      Returns:
      the unrecursed version of this stone color
    • isBlack

      public boolean isBlack()
      Returns:
      Whether or not this stone is of the black variants.
    • isWhite

      public boolean isWhite()
      Returns:
      Whether or not this stone is of the white variants.
    • unGhosted

      public Stone unGhosted()