public class UT2004DeathMatchTournamentConfig extends Object
UT2004DeathMatchTournament
class.
The most interesting method is cleanUp()
that is using recursion to generate all possible
matches for enlisted bots.
Do not forget to use setNumBotsInOneMatch(int)
!
THREAD-UNSAFE!
Modifier and Type | Field and Description |
---|---|
protected Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> |
bots
Custom (Pogamut) bots in the tournament.
|
protected int |
fragLimit
|
protected Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> |
nativeBots
Native bots in the tournament.
|
protected int |
numBotsInOneMatch
How many bots should be present in one match.
|
protected String |
outputDir
|
protected int |
timeLimitInMinutes
|
protected cz.cuni.amis.utils.token.IToken |
tournamentId
Unique id of the tournament.
|
protected cz.cuni.amis.pogamut.ut2004.utils.UCCWrapperConf |
uccConf |
Constructor and Description |
---|
UT2004DeathMatchTournamentConfig()
Parameter-less constructor, don't forget to initialize everything!
|
Modifier and Type | Method and Description |
---|---|
UT2004DeathMatchTournamentConfig |
addBot(UT2004BotConfig... bots)
Adds NEW bot configuration into the object, checks whether there is no BotId clash (if so, throws an exception).
|
UT2004DeathMatchTournamentConfig |
addNativeBot(UT2004NativeBotConfig... bots)
Adds NEW native bot configuration into the object, checks whether there is no BotId clash (if so, throws an exception).
|
void |
cleanUp()
WARNING: Removes directory with tournament results.
|
UT2004DeathMatchTournamentConfig |
clearBots() |
UT2004DeathMatchTournamentConfig |
clearNativeBots() |
UT2004DeathMatchConfig |
createConfiguration(List<cz.cuni.amis.utils.token.IToken> chosenBots)
Creates
UT2004DeathMatchConfig for bots of ids from 'chosenBots'. |
UT2004DeathMatchConfig[] |
createMatcheConfigs()
This method will create all combinations of matche configs that consists of 'numBotsInOneMatch' that is obtained
via
getNumBotsInOneMatch() . |
UT2004DeathMatchConfig[] |
createMatcheConfigs(int numBotsInOneMatch)
This method will create all combinations of matche configs that consists of 'numBotsInOneMatch' bots, i.e., all 1v1 (numBotsInOneMatch == 2) or all 1v1v1 (numBotsInOneMatch == 3), etc.
|
protected void |
generate(List<UT2004DeathMatchConfig> result,
int numBots,
List<cz.cuni.amis.utils.token.IToken> botIds,
int startFrom,
List<cz.cuni.amis.utils.token.IToken> chosenBots) |
protected UT2004DeathMatchConfig[] |
generateMatches(int numBots) |
IUT2004BotConfig |
getBotConfig(cz.cuni.amis.utils.token.IToken botId)
Returns bot configuration regardless it is custom (Pogamut) bot id or native UT2004 bot id.
|
Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> |
getBots()
Map with custom (Pogamut) bots that are enlisted to the tournament.
|
int |
getFragLimit()
|
Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> |
getNativeBots()
Map with native UT2004 bots that are enlisted to the tournament.
|
int |
getNumBotsInOneMatch()
How many bots should be present in one match.
|
String |
getOutputDir()
|
int |
getTimeLimitInMinutes()
|
cz.cuni.amis.utils.token.IToken |
getTournamentId()
Used for unique identification of the tournament (optional).
|
cz.cuni.amis.pogamut.ut2004.utils.UCCWrapperConf |
getUccConf()
UccConfiguration used for running ucc.exe for respective matches.
|
boolean |
isNativeBot(cz.cuni.amis.utils.token.IToken botId) |
UT2004DeathMatchTournamentConfig |
setBot(UT2004BotConfig... bots)
Sets bot configuration into the object, does not checks whether there is BotId clash.
|
UT2004DeathMatchTournamentConfig |
setBots(Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> bots) |
UT2004DeathMatchTournamentConfig |
setFragLimit(int fragLimit) |
UT2004DeathMatchTournamentConfig |
setMapName(String mapName) |
UT2004DeathMatchTournamentConfig |
setNativeBot(UT2004NativeBotConfig... bots)
Sets native bot configuration into the object, does not checks whether there is BotId clash.
|
UT2004DeathMatchTournamentConfig |
setNativeBots(Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> nativeBots) |
void |
setNumBotsInOneMatch(int numBotsInOneMatch) |
UT2004DeathMatchTournamentConfig |
setOutputDir(String outputDir) |
UT2004DeathMatchTournamentConfig |
setTimeLimitInMinutes(int timeLimitInMinutes) |
UT2004DeathMatchTournamentConfig |
setTournamentId(cz.cuni.amis.utils.token.IToken id) |
UT2004DeathMatchTournamentConfig |
setTournamentId(String id) |
void |
setUccConf(cz.cuni.amis.pogamut.ut2004.utils.UCCWrapperConf uccConf) |
UT2004DeathMatchTournamentConfig |
setUnrealHome(String unrealHome) |
protected int numBotsInOneMatch
protected cz.cuni.amis.utils.token.IToken tournamentId
protected int fragLimit
protected int timeLimitInMinutes
protected cz.cuni.amis.pogamut.ut2004.utils.UCCWrapperConf uccConf
protected String outputDir
UT2004DeathMatchConfig.setOutputDirectory(File)
.
Example: "results" + File.separator + "tournament"
protected Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> bots
protected Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> nativeBots
public UT2004DeathMatchTournamentConfig()
public int getNumBotsInOneMatch()
public int getFragLimit()
public int getTimeLimitInMinutes()
public cz.cuni.amis.utils.token.IToken getTournamentId()
public String getOutputDir()
public cz.cuni.amis.pogamut.ut2004.utils.UCCWrapperConf getUccConf()
public Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> getBots()
public Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> getNativeBots()
public void setNumBotsInOneMatch(int numBotsInOneMatch)
public UT2004DeathMatchTournamentConfig setTournamentId(cz.cuni.amis.utils.token.IToken id)
public UT2004DeathMatchTournamentConfig setTournamentId(String id)
public UT2004DeathMatchTournamentConfig setFragLimit(int fragLimit)
public UT2004DeathMatchTournamentConfig setTimeLimitInMinutes(int timeLimitInMinutes)
public UT2004DeathMatchTournamentConfig setUnrealHome(String unrealHome)
public UT2004DeathMatchTournamentConfig setMapName(String mapName)
public UT2004DeathMatchTournamentConfig setOutputDir(String outputDir)
public void setUccConf(cz.cuni.amis.pogamut.ut2004.utils.UCCWrapperConf uccConf)
public UT2004DeathMatchTournamentConfig setBots(Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> bots)
public UT2004DeathMatchTournamentConfig setNativeBots(Map<cz.cuni.amis.utils.token.IToken,UT2004NativeBotConfig> nativeBots)
public UT2004DeathMatchTournamentConfig clearBots()
public UT2004DeathMatchTournamentConfig clearNativeBots()
public UT2004DeathMatchTournamentConfig addBot(UT2004BotConfig... bots)
bots
- public UT2004DeathMatchTournamentConfig setBot(UT2004BotConfig... bots)
bots
- public UT2004DeathMatchTournamentConfig addNativeBot(UT2004NativeBotConfig... bots)
bots
- public UT2004DeathMatchTournamentConfig setNativeBot(UT2004NativeBotConfig... bots)
bots
- public boolean isNativeBot(cz.cuni.amis.utils.token.IToken botId)
public IUT2004BotConfig getBotConfig(cz.cuni.amis.utils.token.IToken botId)
botId
- public void cleanUp()
public UT2004DeathMatchConfig createConfiguration(List<cz.cuni.amis.utils.token.IToken> chosenBots)
UT2004DeathMatchConfig
for bots of ids from 'chosenBots'.
Created configuration IS NOT VALIDATED!
chosenBots
- protected void generate(List<UT2004DeathMatchConfig> result, int numBots, List<cz.cuni.amis.utils.token.IToken> botIds, int startFrom, List<cz.cuni.amis.utils.token.IToken> chosenBots)
protected UT2004DeathMatchConfig[] generateMatches(int numBots)
public UT2004DeathMatchConfig[] createMatcheConfigs(int numBotsInOneMatch)
It does not create matche configs where there are only native UT2004 bots, there is always at least 1 custom (Pogamut) bot in every generated match configs.
Match configurations are NOT VALIDATED!
numBotsInOneMatch
- must be >= 2public UT2004DeathMatchConfig[] createMatcheConfigs()
getNumBotsInOneMatch()
.
It does not create matche configs where there are only native UT2004 bots, there is always at least 1 custom (Pogamut) bot in every generated match configs.
Match configurations are NOT VALIDATED!
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.