Enum Class MoveStepType

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

public enum MoveStepType extends Enum<MoveStepType>
  • Enum Constant Details

  • Method Details

    • values

      public static MoveStepType[] 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 MoveStepType 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
    • entersNewHex

      public boolean entersNewHex()
      Returns whether this move step causes the unit to enter a new hex.
    • getHumanReadableLabel

      public String getHumanReadableLabel()
      Returns the human‑readable label for this move step.
    • fromLabel

      @Deprecated(since="0.51.0", forRemoval=true) public static MoveStepType fromLabel(String label)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the MoveStepType corresponding to the given human-readable label.
      Parameters:
      label - the label to look up (e.g., "F", "Up", "L", etc.)
      Returns:
      the corresponding MoveStepType
      Throws:
      IllegalArgumentException - if no matching type is found
    • stepTypeForRelativeDirection

      public static MoveStepType stepTypeForRelativeDirection(int direction, int facing)
      Returns a step type to use for simple path finding, given the direction to the destination (0 to 5) and the facing of the unit (0 to 5). The step type can be used to get closer to the destination. Used only for Mek Mechanical Jump Booster path finding.
      Parameters:
      direction - The direction to the destination, 0 = N, 4 = SW etc
      facing - The facing of the unit
      Returns:
      A step type to use to get closer to the destination