Package megamek.common.board
Enum Class BoardType
- All Implemented Interfaces:
Serializable
,Comparable<BoardType>
,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionboardTypeForCode
(String code) Returns the MapType represented by the given code.getCode()
Returns a single character code identifying the MapType (e.g.boolean
boolean
isGround()
boolean
boolean
boolean
boolean
isSky()
boolean
isSpace()
int
toString()
static BoardType
Returns the enum constant of this class with the specified name.static BoardType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GROUND
-
FAR_SPACE
-
NEAR_SPACE
-
SKY
-
SKY_WITH_TERRAIN
-
RADAR
-
CAPITAL_RADAR
-
-
Method Details
-
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
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 nameNullPointerException
- 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
-
getCode
Returns a single character code identifying the MapType (e.g. "G" for GROUND). Can be used e.g. in context menus. UseboardTypeForCode(String)
to reconstruct the MapType.- Returns:
- the code character for this MapType
-
boardTypeForCode
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
-
orderValue
public int orderValue()- Returns:
- A value to use for ordering boards according to ground - atmospheric - space.
-