cz.cuni.amis.pogamut.ut2004.tournament.deathmatch
Class UT2004DeathMatchConfig

Package class diagram package UT2004DeathMatchConfig
java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.tournament.match.UT2004MatchConfig
      extended by cz.cuni.amis.pogamut.ut2004.tournament.deathmatch.UT2004DeathMatchConfig

public class UT2004DeathMatchConfig
extends UT2004MatchConfig


Field Summary
protected  int fragLimit
           
protected  boolean humanLikeLog
           
protected  int timeLimitInMin
           
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.tournament.match.UT2004MatchConfig
bots, gb2004Ini, matchId, nativeBots, outputDirectory, uccConf, validationBuffer, validationError
 
Constructor Summary
UT2004DeathMatchConfig()
           
UT2004DeathMatchConfig(UT2004DeathMatchConfig orig)
          Copy-constructor.
 
Method Summary
 UT2004DeathMatchConfig addBot(UT2004BotConfig... bots)
          Adds NEW bot configuration into the object, checks whether there is no BotId clash (if so, throws an exception).
 UT2004DeathMatchConfig addNativeBot(UT2004NativeBotConfig... bots)
          Adds NEW native bot configuration into the object, checks whether there is no BotId clash (if so, throws an exception).
 UT2004DeathMatchConfig clearBots()
           
 UT2004DeathMatchConfig clearNativeBots()
           
 int getFragLimit()
          Returns frag limit (score limit) of the match.
 int getTimeLimit()
          Returns time limit of the match in seconds.
 UT2004MatchConfig setBot(UT2004BotConfig... bots)
          Sets bot configuration into the object, does not checks whether there is BotId clash.
 UT2004DeathMatchConfig setBots(Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> bots)
           
 UT2004DeathMatchConfig setFragLimit(int fragLimit)
          Alters GB2004Ini as well.
 UT2004DeathMatchConfig setGb2004Ini(GameBots2004Ini gb2004Ini)
          Values from current Frag/Time limit are automatically copied into the ini.
 UT2004DeathMatchConfig setHumanLikeLogEnabled(boolean humanLikeLog)
           
 UT2004DeathMatchConfig setNativeBot(UT2004NativeBotConfig... bots)
          Sets native bot configuration into the object, does not checks whether there is BotId clash.
 UT2004DeathMatchConfig setNativeBots(Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> nativeBots)
           
 UT2004DeathMatchConfig setOutputDirectory(File outputDirectory)
           
 UT2004DeathMatchConfig setTimeLimit(int timeLimitInMinutes)
          Alters GB2004Ini as well.
 UT2004DeathMatchConfig setUccConf(UCCWrapperConf uccConf)
           
protected  void validateInner()
          Performs validation of the match configuration: Checks whether the match id is non-null.
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.tournament.match.UT2004MatchConfig
equals, getAllBotIds, getBots, getGb2004Ini, getMatchId, getNativeBots, getOutputDirectory, getUccConf, hashCode, isHumanLikeLogEnabled, isNativeBot, setMatchId, setMatchId, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fragLimit

protected int fragLimit

timeLimitInMin

protected int timeLimitInMin

humanLikeLog

protected boolean humanLikeLog
Constructor Detail

UT2004DeathMatchConfig

public UT2004DeathMatchConfig()

UT2004DeathMatchConfig

public UT2004DeathMatchConfig(UT2004DeathMatchConfig orig)
Copy-constructor.

Parameters:
orig -
Method Detail

getFragLimit

public int getFragLimit()
Returns frag limit (score limit) of the match.

Returns:

getTimeLimit

public int getTimeLimit()
Returns time limit of the match in seconds.

Returns:

clearBots

public UT2004DeathMatchConfig clearBots()
Overrides:
clearBots in class UT2004MatchConfig

clearNativeBots

public UT2004DeathMatchConfig clearNativeBots()
Overrides:
clearNativeBots in class UT2004MatchConfig

setOutputDirectory

public UT2004DeathMatchConfig setOutputDirectory(File outputDirectory)
Overrides:
setOutputDirectory in class UT2004MatchConfig

setFragLimit

public UT2004DeathMatchConfig setFragLimit(int fragLimit)
Alters GB2004Ini as well.

Parameters:
fragLimit -
Returns:

setTimeLimit

public UT2004DeathMatchConfig setTimeLimit(int timeLimitInMinutes)
Alters GB2004Ini as well.

Parameters:
timeLimitInMinutes -
Returns:

setUccConf

public UT2004DeathMatchConfig setUccConf(UCCWrapperConf uccConf)
Overrides:
setUccConf in class UT2004MatchConfig

setGb2004Ini

public UT2004DeathMatchConfig setGb2004Ini(GameBots2004Ini gb2004Ini)
Values from current Frag/Time limit are automatically copied into the ini.

Overrides:
setGb2004Ini in class UT2004MatchConfig
Returns:

setBots

public UT2004DeathMatchConfig setBots(Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> bots)
Overrides:
setBots in class UT2004MatchConfig

setNativeBots

public UT2004DeathMatchConfig setNativeBots(Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> nativeBots)
Overrides:
setNativeBots in class UT2004MatchConfig

addBot

public UT2004DeathMatchConfig addBot(UT2004BotConfig... bots)
Description copied from class: UT2004MatchConfig
Adds NEW bot configuration into the object, checks whether there is no BotId clash (if so, throws an exception).

Overrides:
addBot in class UT2004MatchConfig
Returns:

setBot

public UT2004MatchConfig setBot(UT2004BotConfig... bots)
Description copied from class: UT2004MatchConfig
Sets bot configuration into the object, does not checks whether there is BotId clash.

Overrides:
setBot in class UT2004MatchConfig
Returns:

addNativeBot

public UT2004DeathMatchConfig addNativeBot(UT2004NativeBotConfig... bots)
Description copied from class: UT2004MatchConfig
Adds NEW native bot configuration into the object, checks whether there is no BotId clash (if so, throws an exception).

Overrides:
addNativeBot in class UT2004MatchConfig
Returns:

setNativeBot

public UT2004DeathMatchConfig setNativeBot(UT2004NativeBotConfig... bots)
Description copied from class: UT2004MatchConfig
Sets native bot configuration into the object, does not checks whether there is BotId clash.

Overrides:
setNativeBot in class UT2004MatchConfig
Returns:

setHumanLikeLogEnabled

public UT2004DeathMatchConfig setHumanLikeLogEnabled(boolean humanLikeLog)
Overrides:
setHumanLikeLogEnabled in class UT2004MatchConfig

validateInner

protected void validateInner()
Description copied from class: UT2004MatchConfig
Performs validation of the match configuration:
  1. Checks whether the match id is non-null.
  2. Checks whether all (custom+native) bots have path-to-jar configured + the file exists.
  3. UccWrapper is not null and its directory exists.
  4. Presence of GameBots2004.u as a new game type inside UT2004.
  5. GameBots2004Ini is not null.
  6. Whether there are at least 2 bots defined for the match.

Override to provide/add custom validation (might require copy-paste of the code from this method).

Overrides:
validateInner in class UT2004MatchConfig


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.