Enum Class BattleAIMode
- All Implemented Interfaces:
Serializable
,Comparable<BattleAIMode>
,Constable
Modes for AI in battle.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateAI
(BattleParticipant participant) Creates a new AI corresponding to the mode.static BattleAIMode
getFromIndex
(int index) Gets an AI mode from its enum index.Gets the localized name of the AI mode.Gets the next AI mode in order.static BattleAIMode
Returns the enum constant of this class with the specified name.static BattleAIMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
-
RANDOM
-
AGGRESSIVE
-
TACTICAL
-
ADVANCED
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getFromIndex
Gets an AI mode from its enum index.- Parameters:
index
- The index of the AI mode to get.- Returns:
- The AI mode with the specified index, or random mode if the index is out of bounds.
-
getNextMode
Gets the next AI mode in order.- Returns:
- The next AI mode in order.
-
createAI
Creates a new AI corresponding to the mode.- Parameters:
participant
- The participant to initialize an AI for.- Returns:
- A new AI corresponding to the mode.
-
getLocalizedName
Gets the localized name of the AI mode.- Returns:
- The localized name of the AI mode.
-