Package featurecat.lizzie.rules
Enum Stone
- java.lang.Object
-
- java.lang.Enum<Stone>
-
- featurecat.lizzie.rules.Stone
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLACKBLACK_CAPTUREDBLACK_GHOSTBLACK_POINTBLACK_RECURSEDDAMEEMPTYWHITEWHITE_CAPTUREDWHITE_GHOSTWHITE_POINTWHITE_RECURSED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisBlack()booleanisWhite()Stoneopposite()used to find the opposite color stoneStonerecursed()used to keep track of which stones were visited during removal of dead stonesStoneunGhosted()Stoneunrecursed()used to keep track of which stones were visited during removal of dead stonesstatic StonevalueOf(java.lang.String name)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 Detail
-
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 Detail
-
values
public static Stone[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Stone c : Stone.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Stone valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.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()
-
-