|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.amis.pogamut.ut2004.tournament.deathmatch.UT2004DeathMatchTournamentConfig
public class UT2004DeathMatchTournamentConfig
Configuration for the 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!
Field Summary | |
---|---|
protected Map<cz.cuni.amis.utils.token.IToken,UT2004BotConfig> |
bots
Custom (Pogamut) bots in the tournament. |
protected int |
fragLimit
Used as UT2004DeathMatchConfig.setFragLimit(int) . |
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
Used as UT2004DeathMatchConfig.setOutputDirectory(File) . |
protected int |
timeLimitInMinutes
Used as UT2004DeathMatchConfig.setTimeLimit(int) . |
protected cz.cuni.amis.utils.token.IToken |
tournamentId
Unique id of the tournament. |
protected UCCWrapperConf |
uccConf
|
Constructor Summary | |
---|---|
UT2004DeathMatchTournamentConfig()
Parameter-less constructor, don't forget to initialize everything! |
Method Summary | |
---|---|
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()
Used as UT2004DeathMatchConfig.setFragLimit(int) . |
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()
Used as UT2004DeathMatchConfig.setOutputDirectory(File) . |
int |
getTimeLimitInMinutes()
Used as UT2004DeathMatchConfig.setTimeLimit(int) . |
cz.cuni.amis.utils.token.IToken |
getTournamentId()
Used for unique identification of the tournament (optional). |
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(UCCWrapperConf uccConf)
|
UT2004DeathMatchTournamentConfig |
setUnrealHome(String unrealHome)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int numBotsInOneMatch
protected cz.cuni.amis.utils.token.IToken tournamentId
protected int fragLimit
UT2004DeathMatchConfig.setFragLimit(int)
.
protected int timeLimitInMinutes
UT2004DeathMatchConfig.setTimeLimit(int)
.
protected 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
Constructor Detail |
---|
public UT2004DeathMatchTournamentConfig()
Method Detail |
---|
public int getNumBotsInOneMatch()
public int getFragLimit()
UT2004DeathMatchConfig.setFragLimit(int)
.
public int getTimeLimitInMinutes()
UT2004DeathMatchConfig.setTimeLimit(int)
.
public cz.cuni.amis.utils.token.IToken getTournamentId()
public String getOutputDir()
UT2004DeathMatchConfig.setOutputDirectory(File)
.
public 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(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 >= 2
public 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!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |