cz.cuni.amis.pogamut.ut2004.bot.sposh
Class FileScriptLogic
java.lang.Object
cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController<BOT>
cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotLogicController
cz.cuni.amis.pogamut.ut2004.bot.sposh.StreamScriptLogic
cz.cuni.amis.pogamut.ut2004.bot.sposh.FileScriptLogic
- All Implemented Interfaces:
- cz.cuni.amis.pogamut.base.agent.module.IAgentLogic, IUT2004BotController, IUT2004BotLogicController
Deprecated.
@Deprecated
public abstract class FileScriptLogic
- extends StreamScriptLogic
This class is base class for users who program their agents in some scripting
language and have thir file ready to use. Override FileScriptedAgent.getScriptFile()
to specify the script that will be loaded.
To subclass this class, override getScriptFile(), doLogic() and
other necessary methods. Use callFunction method to call scripted function
from specified script.
- Author:
- Honza
| Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004BotController |
botFirstSpawn, botInitialized, botKilled, botShutdown, finishControllerInitialization, getAct, getInitializeCommand, getLog, getName, getPassword, getWorldView, prepareBot |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface cz.cuni.amis.pogamut.ut2004.bot.IUT2004BotController |
botFirstSpawn, botInitialized, botKilled, botShutdown, finishControllerInitialization, getAct, getInitializeCommand, getLog, getPassword, getWorldView, prepareBot |
FileScriptLogic
public FileScriptLogic()
- Deprecated.
createScriptEngine
protected ScriptEngine createScriptEngine(ScriptEngineManager manager)
- Deprecated.
- Create a
ScriptEngine according to extension of script specified in
getScriptFile()
- Specified by:
createScriptEngine in class StreamScriptLogic
- Parameters:
manager -
- Returns:
- Correct script engine for script file.
getScriptStream
protected Reader getScriptStream()
throws IOException
- Deprecated.
- Get stream of file from script file specified in
FileScriptedAgent.getScriptFile().
- Specified by:
getScriptStream in class StreamScriptLogic
- Returns:
-
- Throws:
IOException - If some problem occurs with getting stream from script file.
getScriptFile
protected abstract String getScriptFile()
- Deprecated.
- Return path to the script file.
Absolute path if possible, because I am not sure about relative path.
TODO: some reliable way to get root directroy of project
- Returns:
- Return path
getExt
protected String getExt(String path)
- Deprecated.
- Get extension of
- Parameters:
path -
- Returns:
- extension or "" if no extension found
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.