Package com.starpoints.game
Class GameInfo
- java.lang.Object
-
- com.starpoints.game.GameInfo
-
- All Implemented Interfaces:
java.io.Serializable
public class GameInfo extends java.lang.Object implements java.io.SerializableStores 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowsLevelSelection()Checks, if level selection is allowed at game start.java.util.Map<java.lang.String,FigureInfo>getFigureInfoTable()Returns the enemy FigureInfo-table.java.lang.StringgetLevelIniFileName()Returns the Levelini-filename.intgetPlayerCount()Returns the player count.java.util.List<FigureInfo>getPlayerInfoList()Returns the player FigureInfo-table.booleanisCustom()Checks, if game is based on custom level ini file.voidsetAllowsLevelSelection(boolean allowsLevelSelection)Sets, if level selection is allowed.voidsetCustom(boolean isCustom)Sets the isCustom-flag.voidsetLevelIniFileName(java.lang.String iniFile)Sets the Levelini-filename.
-
-
-
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 FigureInfosfigureInfos- The map of enemy class names mapped to FigureInfoslevelIniFileName- 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
-
-