Class GameInfo

  • All Implemented Interfaces:
    java.io.Serializable

    public class GameInfo
    extends java.lang.Object
    implements java.io.Serializable
    Stores information for a game creation.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      GameInfo​(int playerCount, java.util.List<FigureInfo> playerInfos, java.util.Map<java.lang.String,​FigureInfo> figureInfos, java.lang.String levelIniFileName)
      Creates a new GameInfo.
    • Constructor Detail

      • GameInfo

        public GameInfo​(int playerCount,
                        java.util.List<FigureInfo> playerInfos,
                        java.util.Map<java.lang.String,​FigureInfo> figureInfos,
                        java.lang.String levelIniFileName)
        Creates a new GameInfo.
        Parameters:
        playerCount - The number of players in the game.
        playerInfos - The map of player names mapped to FigureInfos
        figureInfos - The map of enemy class names mapped to FigureInfos
        levelIniFileName - The name of the level definition file.
    • Method Detail

      • getFigureInfoTable

        public java.util.Map<java.lang.String,​FigureInfo> getFigureInfoTable()
        Returns the enemy FigureInfo-table.
        Returns:
        The table with enemies FigureInfos.
      • getPlayerInfoList

        public java.util.List<FigureInfo> getPlayerInfoList()
        Returns the player FigureInfo-table.
        Returns:
        The table with players FigureInfos.
      • getPlayerCount

        public int getPlayerCount()
        Returns the player count.
        Returns:
        the player count.
      • getLevelIniFileName

        public java.lang.String getLevelIniFileName()
        Returns the Levelini-filename.
        Returns:
        The Levelini-filename.
      • setLevelIniFileName

        public void setLevelIniFileName​(java.lang.String iniFile)
        Sets the Levelini-filename.
        Parameters:
        iniFile - The Levelini-filename.
      • allowsLevelSelection

        public boolean allowsLevelSelection()
        Checks, if level selection is allowed at game start.
        Returns:
        true, if LevelSelection allowed.
      • setAllowsLevelSelection

        public void setAllowsLevelSelection​(boolean allowsLevelSelection)
        Sets, if level selection is allowed.
        Parameters:
        allowsLevelSelection - the allowsLevelSelection to set
      • isCustom

        public boolean isCustom()
        Checks, if game is based on custom level ini file.
        Returns:
        true, if custom game.
      • setCustom

        public void setCustom​(boolean isCustom)
        Sets the isCustom-flag.
        Parameters:
        isCustom - the isCustom to set