Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
guidelines:adding_gamebots_message_to_pogamut_java [2012/02/07 17:43] martin.cerny |
guidelines:adding_gamebots_message_to_pogamut_java [2012/02/07 17:47] martin.cerny |
||
---|---|---|---|
Line 307: | Line 307: | ||
import cz.cuni.amis.pogamut.spyvsspy.communication.SpyVsSpyYylex; | import cz.cuni.amis.pogamut.spyvsspy.communication.SpyVsSpyYylex; | ||
import com.google.inject.AbstractModule; | import com.google.inject.AbstractModule; | ||
- | import cz.cuni.amis.pogamut.base.communication.parser.IWorldMessageParser; | + | import cz.cuni.amis.pogamut.udk.agent.params.UDKAgentParameters; |
import cz.cuni.amis.pogamut.udk.bot.IUDKBotController; | import cz.cuni.amis.pogamut.udk.bot.IUDKBotController; | ||
import cz.cuni.amis.pogamut.udk.communication.parser.IUDKYylex; | import cz.cuni.amis.pogamut.udk.communication.parser.IUDKYylex; | ||
import cz.cuni.amis.pogamut.udk.factory.guice.remoteagent.UDKBotModule; | import cz.cuni.amis.pogamut.udk.factory.guice.remoteagent.UDKBotModule; | ||
- | + | public class SpyVsSpyBotModule< | |
- | public class SpyVsSpyBotModule< | + | |
{ | { | ||
Line 336: | Line 335: | ||
| | ||
} | } | ||
+ | </ | ||
+ | |||
+ | ===== Running the bot ===== | ||
+ | |||
+ | Now you can run you bot with following code (it is nearly the same as the default startup code, only | ||
+ | the module is replaced with our custom module): | ||
+ | |||
+ | <code java> | ||
+ | UDKBotRunner runner = new UDKBotRunner(new SpyVsSpyBotModule(<< | ||
+ | runner.setMain(true); | ||
+ | runner.startAgent(); | ||
+ | |||
</ | </ | ||