| Enum Constant and Description |
|---|
BLACK
Black stone or black player.
|
EMPTY
Empty intersection.
|
WHITE
White stone or white player.
|
| Modifier and Type | Field and Description |
|---|---|
static java.util.List<GoColor> |
BLACK_WHITE |
static java.util.List<GoColor> |
BLACK_WHITE_EMPTY |
static java.util.List<GoColor> |
WHITE_BLACK |
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.String |
getCapitalizedName()
Return color name if used for specifying player.
|
abstract java.lang.String |
getUppercaseLetter()
Return uppercase letter identifying the color.
|
abstract boolean |
isBlackWhite()
Check if color is black or white.
|
abstract GoColor |
otherColor()
Return other color.
|
static GoColor |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static GoColor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GoColor BLACK
public static final GoColor WHITE
public static final GoColor EMPTY
public static final java.util.List<GoColor> BLACK_WHITE
public static final java.util.List<GoColor> WHITE_BLACK
public static final java.util.List<GoColor> BLACK_WHITE_EMPTY
public static GoColor[] values()
for (GoColor c : GoColor.values()) System.out.println(c);
public static GoColor valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant
with the specified namejava.lang.NullPointerException - if the argument is nullpublic abstract java.lang.String getCapitalizedName()
public abstract java.lang.String getUppercaseLetter()
public abstract boolean isBlackWhite()
true, if color is BLACK or
WHITE.public abstract GoColor otherColor()
BLACK for WHITE, WHITE
for BLACK, EMPTY for EMPTY.