Enum Class BoardType

java.lang.Object
java.lang.Enum<BoardType>
megamek.common.board.BoardType
All Implemented Interfaces:
Serializable, Comparable<BoardType>, Constable

public enum BoardType extends Enum<BoardType> implements Serializable
Represents the type of game board (map). Note that low altitude (aka atmospheric) maps may come with or without terrain and space maps may be high altitude maps when they are near a planet. Radar and Capital Radar maps may be used in the Abstract Aerospace Combat rules of SO:AA and SBF.
  • Enum Constant Details

    • GROUND

      public static final BoardType GROUND
    • FAR_SPACE

      public static final BoardType FAR_SPACE
    • NEAR_SPACE

      public static final BoardType NEAR_SPACE
    • SKY

      public static final BoardType SKY
    • SKY_WITH_TERRAIN

      public static final BoardType SKY_WITH_TERRAIN
    • RADAR

      public static final BoardType RADAR
    • CAPITAL_RADAR

      public static final BoardType CAPITAL_RADAR
  • Method Details

    • values

      public static BoardType[] 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 BoardType 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
    • isSpace

      public boolean isSpace()
      Returns:
      True if this board type is a space map, either close to a planet with some atmospheric hexes ("high altitude") or in deeper space.
    • isLowAltitude

      public boolean isLowAltitude()
      Returns:
      True if this board type is an atmospheric map, either with or without terrain ("sky"). This has nothing to do with planetary conditions, only the type of board.
    • isSky

      public boolean isSky()
      Returns:
      True if this board type is an atmospheric map without terrain ("sky"). This has nothing to do with planetary conditions, only the type of board.
    • isGround

      public boolean isGround()
      Returns:
      True if this board type is a ground map.
    • isHighAltitude

      public boolean isHighAltitude()
    • isRadarMap

      public boolean isRadarMap()
    • isCapitalRadarMap

      public boolean isCapitalRadarMap()
    • getDisplayName

      public String getDisplayName()
    • getCode

      public String getCode()
      Returns a single character code identifying the MapType (e.g. "G" for GROUND). Can be used e.g. in context menus. Use boardTypeForCode(String) to reconstruct the MapType.
      Returns:
      the code character for this MapType
    • boardTypeForCode

      public static Optional<BoardType> boardTypeForCode(String code)
      Returns the MapType represented by the given code. (e.g. GROUND for "G"). Can be used e.g. in context menus.
      Returns:
      the MapType for the given code
      Throws:
      IllegalArgumentException - When the given code has no corresponding MapType
    • toString

      public String toString()
      Overrides:
      toString in class Enum<BoardType>
    • orderValue

      public int orderValue()
      Returns:
      A value to use for ordering boards according to ground - atmospheric - space.