Package worldBuilder
Class TerrainType
- java.lang.Object
-
- worldBuilder.TerrainType
-
public class TerrainType extends java.lang.Objecttypes of terrain known to the tile exporting engines
-
-
Field Summary
Fields Modifier and Type Field Description static intDEEP_WATERconstants for defined TerrainTypesstatic intGROUNDconstants for defined TerrainTypesstatic intHIGHconstants for defined TerrainTypesstatic intHILLconstants for defined TerrainTypesstatic intLANDconstants for defined TerrainTypesstatic intLOWconstants for defined TerrainTypesstatic intMOUNTAINconstants for defined TerrainTypesstatic intNONEconstants for defined TerrainTypesstatic intPASSABLE_WATERconstants for defined TerrainTypesstatic intPITconstants for defined TerrainTypesstatic intSHALLOW_WATERconstants for defined TerrainTypesstatic intSLOPEconstants for defined TerrainTypes
-
Constructor Summary
Constructors Constructor Description TerrainType()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisHighLand(int type)determine if a TerrainType is high-landstatic booleanisLand(int type)determine if a TerrainType is landstatic booleanisLowLand(int type)determine if a TerrainType is low-landstatic booleanisWater(int type)determine if a TerrainType is waterstatic java.lang.StringterrainType(int type)return terrain description stringstatic intterrainType(java.lang.String name)map a name into a TerrainType
-
-
-
Field Detail
-
NONE
public static final int NONE
constants for defined TerrainTypes- See Also:
- Constant Field Values
-
DEEP_WATER
public static final int DEEP_WATER
constants for defined TerrainTypes- See Also:
- Constant Field Values
-
SHALLOW_WATER
public static final int SHALLOW_WATER
constants for defined TerrainTypes- See Also:
- Constant Field Values
-
PASSABLE_WATER
public static final int PASSABLE_WATER
constants for defined TerrainTypes- See Also:
- Constant Field Values
-
PIT
public static final int PIT
constants for defined TerrainTypes- See Also:
- Constant Field Values
-
GROUND
public static final int GROUND
constants for defined TerrainTypes- See Also:
- Constant Field Values
-
HILL
public static final int HILL
constants for defined TerrainTypes- See Also:
- Constant Field Values
-
MOUNTAIN
public static final int MOUNTAIN
constants for defined TerrainTypes- See Also:
- Constant Field Values
-
LAND
public static final int LAND
constants for defined TerrainTypes- See Also:
- Constant Field Values
-
LOW
public static final int LOW
constants for defined TerrainTypes- See Also:
- Constant Field Values
-
HIGH
public static final int HIGH
constants for defined TerrainTypes- See Also:
- Constant Field Values
-
SLOPE
public static final int SLOPE
constants for defined TerrainTypes- See Also:
- Constant Field Values
-
-
Method Detail
-
terrainType
public static java.lang.String terrainType(int type)
return terrain description string- Parameters:
type- constant to be displayed- Returns:
- string describing this Terrain
-
terrainType
public static int terrainType(java.lang.String name)
map a name into a TerrainType- Parameters:
name- of terrain class to be encoded- Returns:
- terrainType associated with name
-
isWater
public static boolean isWater(int type)
determine if a TerrainType is water- Parameters:
type- terrain class to be checked- Returns:
- (boolean) is this surface water
-
isLand
public static boolean isLand(int type)
determine if a TerrainType is land- Parameters:
type- terrain class to be checked- Returns:
- (boolean) is this a (nonwater) land terrain
-
isLowLand
public static boolean isLowLand(int type)
determine if a TerrainType is low-land- Parameters:
type- terrain class to be checked- Returns:
- (boolean) is this a non-highland terrain
-
isHighLand
public static boolean isHighLand(int type)
determine if a TerrainType is high-land- Parameters:
type- terrain class to be checked- Returns:
- (boolean) is this a highland terrain
-
-