battlecode.common
public enum Team extends Enum<Team>
switch
statements, it has all the standard enum methods (valueOf,
values, etc.), and you can safely use == for
equality tests.| Modifier and Type | Method and Description |
|---|---|
Team |
opponent()
Determines the team that is the opponent of this team.
|
static Team |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Team[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Team A
public static final Team B
public static final Team NEUTRAL
public static Team[] values()
for (Team c : Team.values()) System.out.println(c);
public static Team 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 Team opponent()