public enum PlayerType extends Enum<PlayerType>
Enum Constant and Description |
---|
Closed |
Computer |
ComputerLeft |
EitherPreferComputer |
EitherPreferHuman |
Neutral |
None |
Observer |
Player |
PlayerLeft |
RescueActive |
RescuePassive |
Unknown |
Modifier and Type | Field and Description |
---|---|
int |
id |
Modifier and Type | Method and Description |
---|---|
boolean |
isGameType()
Identifies whether or not this type is used in-game.
|
boolean |
isLobbyType()
Identifies whether or not this type is used for the pre-game lobby.
|
static PlayerType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PlayerType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PlayerType None
public static final PlayerType Computer
public static final PlayerType Player
public static final PlayerType RescuePassive
public static final PlayerType RescueActive
public static final PlayerType EitherPreferComputer
public static final PlayerType EitherPreferHuman
public static final PlayerType Neutral
public static final PlayerType Closed
public static final PlayerType Observer
public static final PlayerType PlayerLeft
public static final PlayerType ComputerLeft
public static final PlayerType Unknown
public static PlayerType[] values()
for (PlayerType c : PlayerType.values()) System.out.println(c);
public static PlayerType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isLobbyType()
ComputerLeft
would only appear in-game when a computer
player is defeated.public boolean isGameType()
Closed
would not be a valid in-game type.isLobbyType()
Copyright © 2022. All rights reserved.