Class GameBoardNewEvent

java.lang.Object
java.util.EventObject
megamek.common.event.GameEvent
megamek.common.event.board.GameBoardNewEvent
All Implemented Interfaces:
Serializable

public class GameBoardNewEvent extends GameEvent
Instances of this class are sent when the new board for game is set
See Also:
  • Constructor Details

    • GameBoardNewEvent

      public GameBoardNewEvent(Object source, Board oldBoard, Board newBoard, int boardId)
      Constructs the new event with the specified old/new board objects
      Parameters:
      source - The event source
      oldBoard - old game board
      newBoard - new game board
  • Method Details

    • getNewBoard

      public Board getNewBoard()
    • getOldBoard

      public Board getOldBoard()
    • fireEvent

      public void fireEvent(GameListener gameListener)
      Description copied from class: GameEvent
      Sub-classed events implement this method to call their specific method on a GameListener instance that their event has been fired.
      Specified by:
      fireEvent in class GameEvent
      Parameters:
      gameListener - GameListener recipient.
    • getEventName

      public String getEventName()
      Specified by:
      getEventName in class GameEvent
    • getBoardId

      public int getBoardId()
      Returns:
      The ID of both the old and new Board.