Class TerrainLevelBoardProcessor

java.lang.Object
megamek.common.board.postprocess.TerrainLevelBoardProcessor
All Implemented Interfaces:
BoardProcessor

public class TerrainLevelBoardProcessor extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    TerrainLevelBoardProcessor(int terrainType, int fromLevel, int toLevel)
    Creates a level converter for terrain that converts the level of the given terrain type from the given fromLevel to the given toLevel.
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    Performs some action on the board, such as making terrain changes.
    void
    Processes a single hex of the board.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TerrainLevelBoardProcessor

      public TerrainLevelBoardProcessor(int terrainType, int fromLevel, int toLevel)
      Creates a level converter for terrain that converts the level of the given terrain type from the given fromLevel to the given toLevel. Note that terrain type and the levels are not checked for validity.
      Parameters:
      terrainType - the terrain type
      fromLevel - the level that is to be converted; may be Terrain.WILDCARD to affect any terrain level
      toLevel - the level that replaces the fromLevel
  • Method Details

    • processHex

      public void processHex(Hex hex)
      Processes a single hex of the board. This method is called for each hex of the board.
      Parameters:
      hex - The hex to process
    • processBoard

      public final void processBoard(Board board)
      Description copied from interface: BoardProcessor
      Performs some action on the board, such as making terrain changes.
      Specified by:
      processBoard in interface BoardProcessor
      Parameters:
      board - The board to change