Package megamek.common.util
Class AddBotUtil
java.lang.Object
megamek.common.util.AddBotUtil
- Since:
- 11/9/13 8:41 AM
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeBotSettings(BehaviorSettings behavior, String playerName, Client client, StringBuilder message) Replace a ghost player or an existing Princess bot with a new botvoidkickBot(String playerName, Client client, StringBuilder message) replaceGhostWithBot(AIType aiType, BehaviorSettings behavior, String playerName, Client client, StringBuilder message) Replaces a ghost player with a bot of the given AI type.replaceGhostWithBot(BehaviorSettings behavior, String playerName, Client client, StringBuilder message)
-
Field Details
-
COMMAND
- See Also:
-
USAGE
- See Also:
-
-
Constructor Details
-
AddBotUtil
public AddBotUtil()
-
-
Method Details
-
addBot
-
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 placebehavior- the behavior settings to give itplayerName- the ghost player to replaceclient- the client whose game the ghost is inmessage- receives a human-readable result, whether or not the replacement succeeded- Returns:
- the connected bot, or
nullif 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
-