Package owl.game
Enum Game.Owner
- java.lang.Object
-
- java.lang.Enum<Game.Owner>
-
- owl.game.Game.Owner
-
- All Implemented Interfaces:
Serializable
,Comparable<Game.Owner>
- Enclosing interface:
- Game<S,A extends EmersonLeiAcceptance>
public static enum Game.Owner extends Enum<Game.Owner>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEven()
boolean
isOdd()
Game.Owner
opponent()
static Game.Owner
valueOf(String name)
Returns the enum constant of this type with the specified name.static Game.Owner[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PLAYER_1
public static final Game.Owner PLAYER_1
This player wants to dissatisfy the acceptance condition.
-
PLAYER_2
public static final Game.Owner PLAYER_2
This player wants to satisfy the acceptance condition.
-
-
Method Detail
-
values
public static Game.Owner[] 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 (Game.Owner c : Game.Owner.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Game.Owner 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 nameNullPointerException
- if the argument is null
-
opponent
public Game.Owner opponent()
-
isEven
public boolean isEven()
-
isOdd
public boolean isOdd()
-
-