[Pogamut-list] Launching Multiple Bots of Different Types

jacob.schrum pogamut-forum at diana.ms.mff.cuni.cz
Sun Dec 12 19:04:28 CET 2010


Re: Launching Multiple Bots of Different Types

Author: jacob.schrum

I found the examples very helpful too, but there was one step that I didn't fully understand.
It regards this portion of the post:
--------------------------------------------------------------------------------
If you wish to use your own HunterParameters extends UT2004AgentParameters, which have a constructor specifying the skill level of the hunter you will do something like:

UT2004BotDescriptor hunterDesc = new UT2004BotDescriptor().setController(Hunter.class).addParams(new HunterParameters(5));
UT2004BotDescriptor preyDesc = new UT2004BotDescriptor().setController(Prey.class).addParams(new UT2004AgentParameters()).addParams(new UT2004AgentParameters()).addParams(new UT2004AgentParameters());
UT2004BotDescriptor defenderDesc = new UT2004BotDescriptor().setController(Defebder.class).addParams(new UT2004AgentParameters());

new MultipleUT2004BotRunner("Multiple").setMain(true).startAgents(hunterDesc, preyDesc, defenderDesc);
--------------------------------------------------------------------------------

The 5 sent to HunterParameters is presumably assigned to some variable inside HunterParameters. How does this value get assigned to a variable inside the bot? At what point does the Hunter bot have a chance to ask HunterParameters to give it the parameter value of 5?

-Jacob

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=221&post_reply=1#form>





More information about the Pogamut-list mailing list