Enum Class AerospaceVenue
- All Implemented Interfaces:
Serializable,Comparable<AerospaceVenue>,Constable
Aerospace units on ground mapsheets still fly "as though they were moving on the low-altitude map" (TW p.91) - same altitudes, never elevations - but the hexes underneath them are a different size, and almost every derived quantity changes with it. A ground map hex is 30 metres; a low-altitude hex is 500, roughly a whole ground map. That is the 16-to-one ratio the game uses to translate between them (TW p.92).
The two venues diverge far enough that treating them as one case is what produced the bot's current
aerospace behaviour. Naming the venue makes each divergence a deliberate branch instead of a scattered
isAirborneAeroOnGroundMap() test:
- Turning - a low-altitude fighter buys a facing change for
ceil(velocity/2)thrust. On a ground map it must first fly 8 to 52 hexes in a straight line, depending on velocity and class (TW p.92). Facing is close to unusable within a single turn; altitude is not. - Reach - one velocity point carries a low-altitude fighter one hex, and a ground-map fighter sixteen (TW p.92).
- The dead zone - measured in low-altitude hexes either way, so on a ground map it covers sixteen times the ground. One altitude of separation costs a low-altitude fighter two hexes of approach and a ground-map fighter seventeen.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFlying directly over a ground mapsheet, under the Aerospace Units on Ground Mapsheets rules (TW p.91).Flying on a low-altitude map, with or without terrain beneath it. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intGround map hexes spanned by one low-altitude hex. -
Method Summary
Modifier and TypeMethodDescriptionintHow far one point of velocity carries an aerodyne unit here, in hexes of this venue's own map (TW p.92).booleanstatic AerospaceVenueThe venue an airborne aerospace unit is currently flying under.inttoEngagementRange(int hexDistance) Converts a hex distance measured on this venue's map into the low-altitude hexes that aerospace range, bracket and dead-zone rules are written in.static AerospaceVenueReturns the enum constant of this class with the specified name.static AerospaceVenue[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GROUND_MAP
Flying directly over a ground mapsheet, under the Aerospace Units on Ground Mapsheets rules (TW p.91). -
LOW_ALTITUDE
Flying on a low-altitude map, with or without terrain beneath it.
-
-
Field Details
-
GROUND_HEXES_PER_LOW_ALTITUDE_HEX
public static final int GROUND_HEXES_PER_LOW_ALTITUDE_HEXGround map hexes spanned by one low-altitude hex.The map scales are 30 metres and 500 metres respectively, so the true ratio is nearer seventeen, but the game rounds it to sixteen and uses that everywhere - one velocity point moves a ground-map fighter sixteen hexes (TW p.92), and
Compute.effectiveDistancedivides by the same figure.- See Also:
-
-
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
-
of
The venue an airborne aerospace unit is currently flying under.- Parameters:
game- the current gameentity- the unit to place- Returns:
GROUND_MAPwhen the unit is an airborne aero over a ground mapsheet, otherwiseLOW_ALTITUDE
-
isGroundMap
public boolean isGroundMap()- Returns:
truewhen this is the ground mapsheet venue
-
hexesPerVelocityPoint
public int hexesPerVelocityPoint()How far one point of velocity carries an aerodyne unit here, in hexes of this venue's own map (TW p.92).- Returns:
- 16 on a ground mapsheet, 1 at low altitude
-
toEngagementRange
public int toEngagementRange(int hexDistance) Converts a hex distance measured on this venue's map into the low-altitude hexes that aerospace range, bracket and dead-zone rules are written in.Rounds up, matching the engine's own conversion in
Compute.effectiveDistance. The rounding is not cosmetic: on a ground map it decides the boundary case, because seventeen hexes of separation rounds to two low-altitude hexes and sixteen rounds to one.- Parameters:
hexDistance- distance in hexes of this venue's map, negative values treated as zero- Returns:
- the equivalent distance in low-altitude hexes
-