battlecode.common
Enum TerrainTile

java.lang.Object
  extended by java.lang.Enum<TerrainTile>
      extended by 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.


Enum Constant Summary
LAND
           
OFF_MAP
           
VOID
           
 
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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LAND

public static final TerrainTile LAND

VOID

public static final TerrainTile VOID

OFF_MAP

public static final TerrainTile OFF_MAP
Method Detail

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.