Package megamek.common.board.postprocess
Class TerrainLevelBoardProcessor
java.lang.Object
megamek.common.board.postprocess.TerrainLevelBoardProcessor
- All Implemented Interfaces:
BoardProcessor
-
Constructor Summary
ConstructorsConstructorDescriptionTerrainLevelBoardProcessor(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 TypeMethodDescriptionfinal voidprocessBoard(Board board) Performs some action on the board, such as making terrain changes.voidprocessHex(Hex hex) Processes a single hex of the board.
-
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 typefromLevel- the level that is to be converted; may be Terrain.WILDCARD to affect any terrain leveltoLevel- the level that replaces the fromLevel
-
-
Method Details
-
processHex
Processes a single hex of the board. This method is called for each hex of the board.- Parameters:
hex- The hex to process
-
processBoard
Description copied from interface:BoardProcessorPerforms some action on the board, such as making terrain changes.- Specified by:
processBoardin interfaceBoardProcessor- Parameters:
board- The board to change
-