Enum PlayerStatus
- java.lang.Object
-
- java.lang.Enum<PlayerStatus>
-
- be.yildizgames.engine.feature.player.PlayerStatus
-
- All Implemented Interfaces:
Serializable,Comparable<PlayerStatus>
public enum PlayerStatus extends Enum<PlayerStatus>
Possible status for a player.- Author:
- Grégory Van den Borre
-
-
Field Summary
Fields Modifier and Type Field Description intvalue
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PlayerStatusvalueOf(int ord)Get a status from an ordinal value.static PlayerStatusvalueOf(String name)Returns the enum constant of this type with the specified name.static PlayerStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ME
public static final PlayerStatus ME
Represent the current player in this session, only one by game.
-
ALLY
public static final PlayerStatus ALLY
For all player who are ally with this session.
-
HOSTILE
public static final PlayerStatus HOSTILE
Default status for all unit.
-
NEUTRAL
public static final PlayerStatus NEUTRAL
Default status for all doodads.
-
-
Method Detail
-
values
public static PlayerStatus[] 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 (PlayerStatus c : PlayerStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PlayerStatus 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
-
valueOf
public static PlayerStatus valueOf(int ord)
Get a status from an ordinal value.- Parameters:
ord- Place of the enumeration value to retrieve.- Returns:
- The matching enumeration value.
-
-