Package featurecat.lizzie.rules
Enum Stone
- All Implemented Interfaces:
Serializable
,Comparable<Stone>
,java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionboolean
isBlack()
boolean
isWhite()
opposite()
used to find the opposite color stonerecursed()
used to keep track of which stones were visited during removal of dead stonesused to keep track of which stones were visited during removal of dead stonesstatic Stone
Returns the enum constant of this type with the specified name.static Stone[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BLACK
-
WHITE
-
EMPTY
-
BLACK_RECURSED
-
WHITE_RECURSED
-
BLACK_GHOST
-
WHITE_GHOST
-
DAME
-
BLACK_POINT
-
WHITE_POINT
-
BLACK_CAPTURED
-
WHITE_CAPTURED
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
opposite
used to find the opposite color stone- Returns:
- the opposite stone type
-
recursed
used to keep track of which stones were visited during removal of dead stones- Returns:
- the recursed version of this stone color
-
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
-