Package megamek.common.autoResolve.acar
Class SimulatedClient
java.lang.Object
megamek.common.autoResolve.acar.SimulatedClient
- All Implemented Interfaces:
IClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconnect()Attempt to connect to the specified hostvoiddie()Cleans up and closes resources of this Client.getBots()Returns the map containing this Client's local bots, wherein the key is the bot's player name and the value the Client.getGame()Returns the game of this client as a game-type independent IGame.getHost()intgetName()intgetPort()booleanisMyTurn()voidvoidsendDone(boolean done) Sends a "this player is done/not done" message to the server.voidvoidsetLocalPlayerNumber(int localPlayerNumber) Sets the ID of the player playing at this Client.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface megamek.client.IClient
getBotClient, getInGameObject, getInGameObjects, getPlayer, isLocalBot, playerExists
-
Constructor Details
-
SimulatedClient
-
-
Method Details
-
getGame
Description copied from interface:IClientReturns the game of this client as a game-type independent IGame. Note that the game object is only updated, not replaced and a reference to it can therefore be kept. -
getLocalPlayerNumber
public int getLocalPlayerNumber()- Specified by:
getLocalPlayerNumberin interfaceIClient- Returns:
- The ID of the player playing at this Client.
-
getLocalPlayer
- Specified by:
getLocalPlayerin interfaceIClient- Returns:
- The local player (playing at this Client).
-
connect
public boolean connect()Description copied from interface:IClientAttempt to connect to the specified host -
getName
-
getPort
public int getPort() -
getHost
-
isMyTurn
public boolean isMyTurn() -
setLocalPlayerNumber
public void setLocalPlayerNumber(int localPlayerNumber) Description copied from interface:IClientSets the ID of the player playing at this Client.- Specified by:
setLocalPlayerNumberin interfaceIClient- Parameters:
localPlayerNumber- The new local player's ID
-
getBots
Description copied from interface:IClientReturns the map containing this Client's local bots, wherein the key is the bot's player name and the value the Client. -
sendDone
public void sendDone(boolean done) Description copied from interface:IClientSends a "this player is done/not done" message to the server. -
sendChat
-
sendPause
public void sendPause() -
die
public void die()Description copied from interface:IClientCleans up and closes resources of this Client.
-