Package worldBuilder

Class TerrainType


  • public class TerrainType
    extends java.lang.Object
    types of terrain known to the tile exporting engines
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DEEP_WATER
      constants for defined TerrainTypes
      static int GROUND
      constants for defined TerrainTypes
      static int HIGH
      constants for defined TerrainTypes
      static int HILL
      constants for defined TerrainTypes
      static int LAND
      constants for defined TerrainTypes
      static int LOW
      constants for defined TerrainTypes
      static int MOUNTAIN
      constants for defined TerrainTypes
      static int NONE
      constants for defined TerrainTypes
      static int PASSABLE_WATER
      constants for defined TerrainTypes
      static int PIT
      constants for defined TerrainTypes
      static int SHALLOW_WATER
      constants for defined TerrainTypes
      static int SLOPE
      constants for defined TerrainTypes
    • Constructor Summary

      Constructors 
      Constructor Description
      TerrainType()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isHighLand​(int type)
      determine if a TerrainType is high-land
      static boolean isLand​(int type)
      determine if a TerrainType is land
      static boolean isLowLand​(int type)
      determine if a TerrainType is low-land
      static boolean isWater​(int type)
      determine if a TerrainType is water
      static java.lang.String terrainType​(int type)
      return terrain description string
      static int terrainType​(java.lang.String name)
      map a name into a TerrainType
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TerrainType

        public TerrainType()
    • 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