Enum PlayerManager.PlayerRelation
- java.lang.Object
-
- java.lang.Enum<PlayerManager.PlayerRelation>
-
- be.yildizgames.engine.feature.player.PlayerManager.PlayerRelation
-
- All Implemented Interfaces:
Serializable,Comparable<PlayerManager.PlayerRelation>
- Enclosing class:
- PlayerManager
public static enum PlayerManager.PlayerRelation extends Enum<PlayerManager.PlayerRelation>
Relation between 2 players.- Author:
- Van den Borre Grégory
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PlayerManager.PlayerRelationvalueOf(String name)Returns the enum constant of this type with the specified name.static PlayerManager.PlayerRelation[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SAME
public static final PlayerManager.PlayerRelation SAME
The players are the same.
-
ENEMY
public static final PlayerManager.PlayerRelation ENEMY
Players are enemies.
-
ALLY
public static final PlayerManager.PlayerRelation ALLY
Players are allied.
-
NEUTRAL
public static final PlayerManager.PlayerRelation NEUTRAL
Player are neutral.
-
-
Method Detail
-
values
public static PlayerManager.PlayerRelation[] 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 (PlayerManager.PlayerRelation c : PlayerManager.PlayerRelation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PlayerManager.PlayerRelation 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
-
-