[Pogamut-list] Run bot from command line
jakub.gemrot
pogamut-forum at artemis.ms.mff.cuni.cz
Sun May 25 23:16:17 CEST 2008
Re: Run bot from command line
Hello, the best and the most clean way would be to create another class, something like StartAgent.java with the 'main' method something like this:
public static void main(String[] args) throws URISyntaxException {
URI gameBots = new URI("ut://localhost"); // uri of your gamebots server
// or use version with uri provided from command line
// URI gameBots = new URI(args[0]);
MyBot bot = new MyBot(); // class of your bot (descendant of the Agent class)
AgentLauncher launcher = new AgentLauncher(bot, gameBots, true);
launcher.launch();
}
Hope it helps!
Cheers,
Jakub Gemrot
----
Reply Link: <https://artemis.ms.mff.cuni.cz/pogamut/tiki-view_forum_thread.php?forumId=6&comments_reply_threadId=208&comments_parentId=207&post_reply=1#form>
More information about the Pogamut-list
mailing list