Class AddBotUtil

java.lang.Object
megamek.common.util.AddBotUtil

public class AddBotUtil extends Object
Since:
11/9/13 8:41 AM
  • Field Details

  • Constructor Details

    • AddBotUtil

      public AddBotUtil()
  • Method Details

    • addBot

      public String addBot(String[] args, Game game, String host, int port)
    • replaceGhostWithBot

      @Nullable public BotClient replaceGhostWithBot(BehaviorSettings behavior, String playerName, Client client, StringBuilder message)
    • replaceGhostWithBot

      @Nullable public BotClient replaceGhostWithBot(AIType aiType, BehaviorSettings behavior, String playerName, Client client, StringBuilder message)
      Replaces a ghost player with a bot of the given AI type.
      Parameters:
      aiType - which bot implementation to stand up in the ghost's place
      behavior - the behavior settings to give it
      playerName - the ghost player to replace
      client - the client whose game the ghost is in
      message - receives a human-readable result, whether or not the replacement succeeded
      Returns:
      the connected bot, or null if the player was not a ghost or the bot failed to connect
    • changeBotSettings

      public void changeBotSettings(BehaviorSettings behavior, String playerName, Client client, StringBuilder message)
      Replace a ghost player or an existing Princess bot with a new bot
    • kickBot

      public void kickBot(String playerName, Client client, StringBuilder message)