cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands
Class GameConfiguration

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.GameConfiguration

public class GameConfiguration
extends CommandMessage

Representation of the GameBots2004 command CONFGAME. Configures various attributes of the game.


Field Summary
protected  java.lang.String GameMessage
          Message that will be displayed in the middle of the HUD.
protected  java.lang.Double GameMessageTime
          Time the displayed message will stay on the HUD.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  java.lang.Boolean Restart
          When set to true, the game state will be restarted (all scores reset to 0 and all players and bots will be restarted).
 
Constructor Summary
GameConfiguration()
          Creates new instance of command GameConfiguration.
GameConfiguration(java.lang.Boolean Restart, java.lang.String GameMessage, java.lang.Double GameMessageTime)
          Creates new instance of command GameConfiguration.
GameConfiguration(GameConfiguration original)
          Cloning constructor.
 
Method Summary
 java.lang.String getGameMessage()
          Message that will be displayed in the middle of the HUD.
 java.lang.Double getGameMessageTime()
          Time the displayed message will stay on the HUD.
 java.lang.Boolean isRestart()
          When set to true, the game state will be restarted (all scores reset to 0 and all players and bots will be restarted).
 GameConfiguration setGameMessage(java.lang.String GameMessage)
          Message that will be displayed in the middle of the HUD.
 GameConfiguration setGameMessageTime(java.lang.Double GameMessageTime)
          Time the displayed message will stay on the HUD.
 GameConfiguration setRestart(java.lang.Boolean Restart)
          When set to true, the game state will be restarted (all scores reset to 0 and all players and bots will be restarted).
 java.lang.String toHtmlString()
           
 java.lang.String toMessage()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

public static final java.lang.String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

Restart

protected java.lang.Boolean Restart
When set to true, the game state will be restarted (all scores reset to 0 and all players and bots will be restarted). This does not affect Unreal native bots! Note that the restart is then announced by GameRestarted message and when finished another GameRestarted message is sent to mark the end.


GameMessage

protected java.lang.String GameMessage
Message that will be displayed in the middle of the HUD.


GameMessageTime

protected java.lang.Double GameMessageTime
Time the displayed message will stay on the HUD.

Constructor Detail

GameConfiguration

public GameConfiguration(java.lang.Boolean Restart,
                         java.lang.String GameMessage,
                         java.lang.Double GameMessageTime)
Creates new instance of command GameConfiguration. Configures various attributes of the game. Corresponding GameBots message for this command is CONFGAME.

Parameters:
Restart - When set to true, the game state will be restarted (all scores reset to 0 and all players and bots will be restarted). This does not affect Unreal native bots! Note that the restart is then announced by GameRestarted message and when finished another GameRestarted message is sent to mark the end.
GameMessage - Message that will be displayed in the middle of the HUD.
GameMessageTime - Time the displayed message will stay on the HUD.

GameConfiguration

public GameConfiguration()
Creates new instance of command GameConfiguration. Configures various attributes of the game. Corresponding GameBots message for this command is CONFGAME.

WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!


GameConfiguration

public GameConfiguration(GameConfiguration original)
Cloning constructor.

Parameters:
original -
Method Detail

isRestart

public java.lang.Boolean isRestart()
When set to true, the game state will be restarted (all scores reset to 0 and all players and bots will be restarted). This does not affect Unreal native bots! Note that the restart is then announced by GameRestarted message and when finished another GameRestarted message is sent to mark the end.


setRestart

public GameConfiguration setRestart(java.lang.Boolean Restart)
When set to true, the game state will be restarted (all scores reset to 0 and all players and bots will be restarted). This does not affect Unreal native bots! Note that the restart is then announced by GameRestarted message and when finished another GameRestarted message is sent to mark the end.


getGameMessage

public java.lang.String getGameMessage()
Message that will be displayed in the middle of the HUD.


setGameMessage

public GameConfiguration setGameMessage(java.lang.String GameMessage)
Message that will be displayed in the middle of the HUD.


getGameMessageTime

public java.lang.Double getGameMessageTime()
Time the displayed message will stay on the HUD.


setGameMessageTime

public GameConfiguration setGameMessageTime(java.lang.Double GameMessageTime)
Time the displayed message will stay on the HUD.


toString

public java.lang.String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()