Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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<PARAMS extends UDKAgentParameters> extends UDKBotModule<PARAMS> 
-public class SpyVsSpyBotModule<PARAMS extends SpyVsSpyAgentParameters> extends UDKBotModule<PARAMS> +
 { {
  
Line 336: Line 335:
          
 } }
 +</code>
 +
 +===== 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(<<YOURBOTCLASS>>.class), "SpyVsSpy");
 +        runner.setMain(true);
 +        runner.startAgent();
 +
 </code> </code>
  
guidelines/adding_gamebots_message_to_pogamut_java.txt · Last modified: 2012/02/07 17:50 by martin.cerny