Package megamek.common.board
Enum Class BridgeConstruction.BridgeRepairIssue
java.lang.Object
java.lang.Enum<BridgeConstruction.BridgeRepairIssue>
megamek.common.board.BridgeConstruction.BridgeRepairIssue
- All Implemented Interfaces:
Serializable,Comparable<BridgeConstruction.BridgeRepairIssue>,Constable
- Enclosing class:
BridgeConstruction
public static enum BridgeConstruction.BridgeRepairIssue
extends Enum<BridgeConstruction.BridgeRepairIssue>
The reason a hex is or is not a valid bridge-repair site, so callers can explain a rejection to the
player. Repairing a destroyed bridge section is an unofficial option (not part of any published ruleset): a
Bridge-Building Engineer platoon refills one missing hex of an existing bridge, working from an adjacent
surviving span or bank. See
BridgeConstruction.bridgeRepairIssue(megamek.common.board.Board, megamek.common.board.Coords, int).-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe exits are not two distinct hexsides (cannot happen through the normal UI).With one surviving span, the far side does not continue the run: it is not the straight hexside opposite the span, or it does not reach a bank a unit can step on/off of (open water or deep canyon).Neither connected neighbor is a surviving span of a bridge pointing into the hex - nothing to reconnect.The hex already holds a bridge, building or fuel tank - there is no gap to repair.The site hex or one of its connected neighbors is off the board.The site is a valid repair gap. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static BridgeConstruction.BridgeRepairIssue[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VALID
The site is a valid repair gap. -
BAD_EXITS
The exits are not two distinct hexsides (cannot happen through the normal UI). -
OFF_BOARD
The site hex or one of its connected neighbors is off the board. -
NOT_A_GAP
The hex already holds a bridge, building or fuel tank - there is no gap to repair. -
NO_SURVIVING_SPAN
Neither connected neighbor is a surviving span of a bridge pointing into the hex - nothing to reconnect. -
FAR_SIDE_UNANCHORED
With one surviving span, the far side does not continue the run: it is not the straight hexside opposite the span, or it does not reach a bank a unit can step on/off of (open water or deep canyon).
-
-
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
-