battlecode.common
Enum TerrainTile
java.lang.Object
java.lang.Enum<TerrainTile>
battlecode.common.TerrainTile
- All Implemented Interfaces:
- Serializable, Comparable<TerrainTile>
public enum TerrainTile
- extends Enum<TerrainTile>
Represents data of the terrain of a location on the map.
Method Summary |
boolean |
isTraversableAtHeight(RobotLevel height)
Returns true if robots at the given
height can traverse this terrain tile. |
static TerrainTile |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static TerrainTile[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
LAND
public static final TerrainTile LAND
VOID
public static final TerrainTile VOID
OFF_MAP
public static final TerrainTile OFF_MAP
values
public static TerrainTile[] 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 (TerrainTile c : TerrainTile.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static TerrainTile 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 name
NullPointerException
- if the argument is null
isTraversableAtHeight
public boolean isTraversableAtHeight(RobotLevel height)
- Returns
true
if robots at the given
height can traverse this terrain tile.