Class GameData


public class GameData extends EntityDataMap<GameData.Field>
Container for game state data using a map-based approach with enum keys.
  • Constructor Details

    • GameData

      public GameData()
      Creates an empty GameData.
  • Method Details

    • fromGame

      public static GameData fromGame(Game game)
      Creates a GameData from a Game.
      Parameters:
      game - The game to extract data from
      Returns:
      A populated GameData
    • getUnitStates

      public List<UnitState> getUnitStates()
      Gets the list of unit states in this game data.
      Returns:
      List of UnitStateMap objects
    • getMinefields

      public List<GameData.MinefieldData> getMinefields()
      Gets the list of minefields in this game data.
      Returns:
      List of MinefieldData objects