|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.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,
String bot1JarPath,
String bot2Name,
String bot2JarPath)
Initializes all needed fields for combat of 2 bots. |
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
- 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()
UT2004BotConfig.setBotId(String)
for the first bot.
public String getBot1JarPath()
UT2004BotExecutionConfig.setPathToBotJar(String)
for the first bot.
public String getBot2Name()
UT2004BotConfig.setBotId(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 setBot1JarPath(String bot1JarPath)
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 Runnable
cz.cuni.amis.utils.exception.PogamutException
- wraps any exception into this onepublic 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 |