VASSAL.build.module
Interface GameComponent

All Known Implementing Classes:
BoardPicker, DrawPile, EventLog, GlobalMap, Map, ModuleExtension, NotesWindow, ObscurableOptions, PieceMover, PlayerRoster, Zoomer

public interface GameComponent

A GameComponent is any object which reacts to the start/end of a game, or whose state can be saved as part of a game.


Method Summary
 Command getRestoreCommand()
          When saving a game, each GameComponent should return a Command that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null
 void setup(boolean gameStarting)
          Notify the GameComponent that a game has started/ended
 

Method Detail

setup

public void setup(boolean gameStarting)
Notify the GameComponent that a game has started/ended

Parameters:
gameStarting - if true, a game is starting. If false, then a game is ending

getRestoreCommand

public Command getRestoreCommand()
When saving a game, each GameComponent should return a Command that, when executed, restores the GameComponent to its state when the game was saved If this component has no persistent state, return null