Interface GameComponent

All Known Implementing Classes:
BasicLogger, Board.Cleanup, BoardPicker, ChessClock, ChessClockControl, DrawPile, EventLog, Flare, GameRefresher, GlobalMap, GlobalProperty, GlobalTranslatableMessage, HidePiecesButton, HighlightLastMoved, InternetDiceButton, Inventory, Map, MapShader, ModuleExtension, ModulePlugin, MultiActionButton, NewGameIndicator, NotesWindow, ObscurableOptions, PieceMover, PlayerHand, PlayerRoster, PredefinedSetup, PrivateMap, PrivateNotesController, SecretNotesController, SetupStack, StartupGlobalKeyCommand, ToolbarMenu, TurnTracker, WidgetMap, Zone, ZoneProperty, 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

    Modifier and Type
    Method
    Description
    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 Details

    • setup

      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

      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