|
||||||||||
| 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.UT2004DeathMatch1v1
public class UT2004DeathMatch1v1
Performs 1v1 death-match for two Pogamut bots (no native bots here).
You may run it inside thread by invoking new Thread(ut2004DeathMatch1v1).start() or use with ThreadPoolExecutor as it
is implementing Callable.
But you will usually want just to execute it using call().
Encapsulates classes: UT2004DeathMatch, UT2004DeathMatchConfig, UT2004BotConfig and UCCWrapperConf.
If you want to know how all instanes of UT2004DeathMatch configuration are setup, see configure1Vs1()
code.
| Constructor Summary | |
|---|---|
UT2004DeathMatch1v1()
Parameter-less constructor, don't forget to initialize everything! |
|
UT2004DeathMatch1v1(String matchName)
Match-name only constructor, don't forget to initialize everything! |
|
UT2004DeathMatch1v1(String unrealHome,
String mapName,
String bot1Name,
Integer bot1Skill,
String bot1Skin,
String bot1JarPath,
String bot2Name,
Integer bot2Skill,
String bot2Skin,
String bot2JarPath)
Initializes all need fields for combat of 2 bots + customize skins and desired skill levels of bots. |
|
UT2004DeathMatch1v1(String unrealHome,
String mapName,
String bot1Name,
String bot1JarPath,
String bot2Name,
String bot2JarPath)
Initializes all needed fields for combat of 2 bots. |
|
| Method Summary | |
|---|---|
UT2004DeathMatchResult |
call()
|
void |
cleanUp()
Removes directory with match results, called automatically in run(). |
protected UT2004DeathMatchConfig |
configure1Vs1()
Contains main code that setups the UT2004DeathMatchConfig, UT2004BotConfig and UCCWrapper
instances (it might be interesting for you to check the code for yourself if you wish to customize it further...). |
UT2004DeathMatch |
createMatch()
Creates new instance of UT2004DeathMatch with desired configuration + validates it (i.e., if it won't throw an exception
you may be sure, that the UT2004DeathMatch instance is correctly configured). |
String |
getBot1JarPath()
Used as UT2004BotExecutionConfig.setPathToBotJar(String) for the first bot. |
String |
getBot1Name()
Used as UT2004BotExecutionConfig.setBotId(String) for the first bot. |
Integer |
getBot1Skill()
Used as UT2004BotConfig#setDesiredSkill(int) for the first bot. |
String |
getBot1Skin()
Used as UT2004BotConfig#setSkin(String) for the first bot. |
String |
getBot2JarPath()
Used as UT2004BotExecutionConfig.setPathToBotJar(String) for the second bot. |
String |
getBot2Name()
Used as UT2004BotExecutionConfig.setBotId(String) for the second bot. |
Integer |
getBot2Skill()
Used as UT2004BotConfig#setDesiredSkill(int) for the second bot. |
String |
getBot2Skin()
Used as UT2004BotConfig#setSkin(String) for the second bot. |
Throwable |
getException()
If run() terminates with an exception, it will be made available through this getter. |
int |
getFragLimit()
Used as UT2004DeathMatchConfig.setFragLimit(int). |
cz.cuni.amis.pogamut.base.utils.logging.LogCategory |
getLog()
Logger used for outputting info about the match. |
String |
getMapName()
Used as UCCWrapperConf.setMapName(String). |
String |
getMatchName()
Used as UT2004MatchConfig.setMatchId(String). |
String |
getOutputDir()
Used as UT2004DeathMatchConfig.setOutputDirectory(File). |
UT2004DeathMatchResult |
getResult()
Last result of the match. |
int |
getTimeLimitInMinutes()
Used as UT2004DeathMatchConfig.setTimeLimit(int). |
String |
getUnrealHome()
Used as UCCWrapperConf.setMapName(String). |
void |
run()
Executes the match. |
UT2004DeathMatch1v1 |
setBot1JarPath(String bot1JarPath)
|
UT2004DeathMatch1v1 |
setBot1Name(String bot1Name)
|
UT2004DeathMatch1v1 |
setBot1Skill(Integer skill)
|
UT2004DeathMatch1v1 |
setBot1Skin(String skin)
|
UT2004DeathMatch1v1 |
setBot2JarPath(String bot2JarPath)
|
UT2004DeathMatch1v1 |
setBot2Name(String bot2Name)
|
UT2004DeathMatch1v1 |
setBot2Skill(Integer skill)
|
UT2004DeathMatch1v1 |
setBot2Skin(String skin)
|
UT2004DeathMatch1v1 |
setFragLimit(int fragLimit)
|
UT2004DeathMatch1v1 |
setHumanLikeLogEnabled(boolean humanLikeLogEnabled)
|
void |
setLog(cz.cuni.amis.pogamut.base.utils.logging.LogCategory log)
Sets logger used for outputting info about the match. |
UT2004DeathMatch1v1 |
setMapName(String mapName)
|
UT2004DeathMatch1v1 |
setMatchName(String matchName)
|
UT2004DeathMatch1v1 |
setOutputDir(String outputDir)
|
UT2004DeathMatch1v1 |
setTimeLimitInMinutes(int timeLimitInMinutes)
|
UT2004DeathMatch1v1 |
setUnrealHome(String unrealHome)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UT2004DeathMatch1v1()
public UT2004DeathMatch1v1(String matchName)
public UT2004DeathMatch1v1(String unrealHome,
String mapName,
String bot1Name,
String bot1JarPath,
String bot2Name,
String bot2JarPath)
Used time limit: 20 minutes,
Used frag limit: 20
Recommended mapName: DM-1on1-Albatross
unrealHome - mapName - bot1Name - bot1JarPath - bot2Name - bot2JarPath -
public UT2004DeathMatch1v1(String unrealHome,
String mapName,
String bot1Name,
Integer bot1Skill,
String bot1Skin,
String bot1JarPath,
String bot2Name,
Integer bot2Skill,
String bot2Skin,
String bot2JarPath)
unrealHome - mapName - bot1Name - bot1Skill - bot1Skin - bot1JarPath - bot2Name - bot2Skill - bot2Skin - bot2JarPath - | Method Detail |
|---|
public cz.cuni.amis.pogamut.base.utils.logging.LogCategory getLog()
If you want to output stuff to console, use LogCategory.addConsoleHandler().
public int getFragLimit()
UT2004DeathMatchConfig.setFragLimit(int).
public int getTimeLimitInMinutes()
UT2004DeathMatchConfig.setTimeLimit(int).
public String getMatchName()
UT2004MatchConfig.setMatchId(String).
public String getBot1Name()
UT2004BotExecutionConfig.setBotId(String) for the first bot.
public Integer getBot1Skill()
UT2004BotConfig#setDesiredSkill(int) for the first bot.
public String getBot1Skin()
UT2004BotConfig#setSkin(String) for the first bot.
public String getBot1JarPath()
UT2004BotExecutionConfig.setPathToBotJar(String) for the first bot.
public String getBot2Name()
UT2004BotExecutionConfig.setBotId(String) for the second bot.
public Integer getBot2Skill()
UT2004BotConfig#setDesiredSkill(int) for the second bot.
public String getBot2Skin()
UT2004BotConfig#setSkin(String) for the second bot.
public String getBot2JarPath()
UT2004BotExecutionConfig.setPathToBotJar(String) for the second bot.
public String getUnrealHome()
UCCWrapperConf.setMapName(String).
public String getMapName()
UCCWrapperConf.setMapName(String).
public String getOutputDir()
UT2004DeathMatchConfig.setOutputDirectory(File).
public UT2004DeathMatchResult getResult()
run().
public Throwable getException()
run() terminates with an exception, it will be made available through this getter.
public void setLog(cz.cuni.amis.pogamut.base.utils.logging.LogCategory log)
log - public UT2004DeathMatch1v1 setFragLimit(int fragLimit)
public UT2004DeathMatch1v1 setTimeLimitInMinutes(int timeLimitInMinutes)
public UT2004DeathMatch1v1 setMatchName(String matchName)
public UT2004DeathMatch1v1 setBot1Name(String bot1Name)
public UT2004DeathMatch1v1 setBot1Skill(Integer skill)
public UT2004DeathMatch1v1 setBot1Skin(String skin)
public UT2004DeathMatch1v1 setBot1JarPath(String bot1JarPath)
public UT2004DeathMatch1v1 setBot2Skill(Integer skill)
public UT2004DeathMatch1v1 setBot2Skin(String skin)
public UT2004DeathMatch1v1 setBot2Name(String bot2Name)
public UT2004DeathMatch1v1 setBot2JarPath(String bot2JarPath)
public UT2004DeathMatch1v1 setUnrealHome(String unrealHome)
public UT2004DeathMatch1v1 setMapName(String mapName)
public UT2004DeathMatch1v1 setOutputDir(String outputDir)
public UT2004DeathMatch1v1 setHumanLikeLogEnabled(boolean humanLikeLogEnabled)
public void cleanUp()
run().
protected UT2004DeathMatchConfig configure1Vs1()
UT2004DeathMatchConfig, UT2004BotConfig and UCCWrapper
instances (it might be interesting for you to check the code for yourself if you wish to customize it further...).
public UT2004DeathMatch createMatch()
UT2004DeathMatch with desired configuration + validates it (i.e., if it won't throw an exception
you may be sure, that the UT2004DeathMatch instance is correctly configured).
public void run()
cleanUp(), than it configures UT2004DeathMatch via createMatch()
and UT2004DeathMatch.execute()s it.
If no exception occurs during the match (== match will successfully finish), match result will be available through getResult().
If exception occurs (due to whatever reason), this exception will be available through getException().
run in interface Runnablecz.cuni.amis.utils.exception.PogamutException - wraps any exception into this one
public UT2004DeathMatchResult call()
throws Exception
call in interface Callable<UT2004DeathMatchResult>Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||