Package megamek.client.bot

Examples of megamek.client.bot.BotClient.connect()


        // setup any bots
        for (int x = 0; x < pa.length; x++) {
            if (sd.playerTypes[x] == ScenarioDialog.T_BOT) {
                BotClient c = new TestBot(pa[x].getName(), "localhost", hd.port); //$NON-NLS-1$
                c.game.addGameListener(new BotGUI(c));
                if (!c.connect()) {
                }
                c.retrieveServerInfo();
            }
        }
View Full Code Here


        for (int x = 0; x < pa.length; x++) {
            if (sd.playerTypes[x] == ScenarioDialog.T_BOT) {
                BotClient c = new TestBot(pa[x].getName(), "localhost", hd.port); //$NON-NLS-1$
                c.game.addGameListener(new BotGUI(c));

                if (!c.connect()) {
                }

                c.retrieveServerInfo();
            }
        }
View Full Code Here

                name = p.getText();
            }
            BotClient c = new TestBot(name, client.getHost(), client.getPort());
            c.game.addGameListener(new BotGUI(c));
            try {
                c.connect();
            } catch (Exception e) {
                clientgui
                        .doAlertDialog(
                                Messages.getString("ChatLounge.AlertBot.title"), Messages.getString("ChatLounge.AlertBot.message")); //$NON-NLS-1$ //$NON-NLS-2$
            }
View Full Code Here

            }

            BotClient c = new TestBot(name, client.getHost(), client.getPort());
            c.game.addGameListener(new BotGUI(c));
            try {
                c.connect();
            } catch (Exception e) {
                clientgui
                        .doAlertDialog(
                                Messages.getString("ChatLounge.AlertBot.title"), Messages.getString("ChatLounge.AlertBot.message")); //$NON-NLS-1$ //$NON-NLS-2$
            }
View Full Code Here

        if (target.isGhost()) {
            BotClient c = new TestBot(target.getName(), server.getHost(),
                    server.getPort());
            c.game.addGameListener(new BotGUI(c));
            try {
                c.connect();
            } catch (Exception e) {
                server.sendServerChat(connId, "Bot failed to connect.");
            }
            c.retrieveServerInfo();
            server.sendServerChat("Bot has replaced " + target.getName() + ".");
View Full Code Here

        if (target.isGhost()) {
            BotClient c = new TestBot(target.getName(), client.getHost(),
                    client.getPort());
            c.game.addGameListener(new BotGUI(c));
            try {
                c.connect();
            } catch (Exception e) {
                return "Bot failed to connect.";
            }
            c.retrieveServerInfo();
            return "Bot has replaced " + target.getName() + ".";
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.