Package com.ohacd.matchbox.api.events
Enum Class GameEndEvent.EndReason
- All Implemented Interfaces:
Serializable,Comparable<GameEndEvent.EndReason>,Constable
- Enclosing class:
GameEndEvent
Reasons why a game can end.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionInnocents won (spark voted out)Game ended due to lack of playersGame was ended manually by adminOther reasonsSpark won (all innocents eliminated) -
Method Summary
Modifier and TypeMethodDescriptionstatic GameEndEvent.EndReasonReturns the enum constant of this class with the specified name.static GameEndEvent.EndReason[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SPARK_WIN
Spark won (all innocents eliminated) -
INNOCENTS_WIN
Innocents won (spark voted out) -
MANUAL_END
Game was ended manually by admin -
INSUFFICIENT_PLAYERS
Game ended due to lack of players -
OTHER
Other reasons
-
-
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
-