Package model

Enum Class Types

All Implemented Interfaces:
Serializable, Comparable<Types>, Constable

public enum Types extends Enum<Types>
The Game types which are used in the game and rendered in the game
  • Enum Constant Details

    • CASTLE

      public static final Types CASTLE
      The Castle type
    • BARRACKS

      public static final Types BARRACKS
      The Barracks type
    • BARRICADE

      public static final Types BARRICADE
      The Barricade type
    • SHOTGUN

      public static final Types SHOTGUN
      The Shotgun type
    • SNIPER

      public static final Types SNIPER
      The Sniper type
    • SOLDIER

      public static final Types SOLDIER
      The Soldier type
    • ASSASSIN

      public static final Types ASSASSIN
      The Assassin type
    • KAMIKAZE

      public static final Types KAMIKAZE
      The Kamikaze type
    • DIVER

      public static final Types DIVER
      The Diver type
    • CLIMBER

      public static final Types CLIMBER
      The Climber type
    • PLAINS

      public static final Types PLAINS
      The Plains type
    • DESERT

      public static final Types DESERT
      The Desert type
    • SWAMP

      public static final Types SWAMP
      The Forest type
    • MOUNTAIN

      public static final Types MOUNTAIN
      The Mountain type
    • NONE

      public static final Types NONE
      The None type
    • NO_SELECTION

      public static final Types NO_SELECTION
      The No Select type
    • DELETE

      public static final Types DELETE
      Delete type
  • Field Details

    • text

      public final String text
      String value of Enum
    • color

      public Color color
      Color value of enum
  • Method Details

    • values

      public static Types[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Types valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getSoldierTypes

      public static ArrayList<Types> getSoldierTypes()
      Returns the Soldier enum types.
      Returns:
      soldier types
    • getBuildingTypes

      public static ArrayList<Types> getBuildingTypes()
      Returns the Building enum types.
      Returns:
      building types
    • getTerrainTypes

      public static ArrayList<Types> getTerrainTypes()
      Returns the Tile enum types.
      Returns:
      tile types
    • getTowerTypes

      public static ArrayList<Types> getTowerTypes()
      Returns the Tower enum types.
      Returns:
      tower types
    • getUpgradeable

      public static ArrayList<Types> getUpgradeable()
      Returns the Upgradeable Tower enum types.
      Returns:
      upgradeable tower types
    • buildingFactory

      public static Building buildingFactory(Types objectType, int x, int y)
      Factory method for creating a new Building instance.
      Parameters:
      objectType - the type of building to create
      x - the x coordinate of the building
      y - the y coordinate of the building
      Returns:
      the new building
    • terrainFactory

      public static Terrain terrainFactory(Types objectType, ArrayList<Entity> entities)
      Factory method for creating a new Terrain instance.
      Parameters:
      objectType - the type of terrain to create
      entities - the entities to add to the tile
      Returns:
      the new terrain
    • soldierFactory

      public static Soldier soldierFactory(Types objectType, int x, int y)
      Factory method for creating a new Soldier instance.
      Parameters:
      objectType - the type of soldier to create
      x - the x coordinate of the soldier
      y - the y coordinate of the soldier
      Returns:
      the new soldier