megamek.client.bot
Class BotClient
java.lang.Object
megamek.client.Client
megamek.client.bot.BotClient
- All Implemented Interfaces:
- IClientCommandHandler
- Direct Known Subclasses:
- TestBot
public abstract class BotClient
- extends Client
|
Constructor Summary |
BotClient(java.lang.String playerName,
java.lang.String host,
int port)
|
| Methods inherited from class megamek.client.Client |
addCloseClientListener, canUnloadStranded, changeTurnIndex, connect, deploy, deploy, die, disconnected, flushConn, getAllCommandNames, getArtilleryAutoHit, getBoard, getCommand, getEntities, getEntity, getFirstDeployableEntityNum, getFirstEntityNum, getHost, getLocalPlayer, getMapSettings, getMyTurn, getName, getNextDeployableEntityNum, getNextEntityNum, getPlayer, getPlayers, getPort, getSelectedEntities, handlePacket, isMyTurn, moveEntity, receiveAttack, receiveBoard, receiveBuildingCollapse, receiveBuildingUpdateCF, receiveDeployMinefields, receiveEntities, receiveEntityAdd, receiveEntityRemove, receiveEntityUpdate, receiveEntityVisibilityIndicator, receivePlayerInfo, receiveRemoveMinefield, receiveReport, receiveRevealMinefield, receiveSendingMinefields, receiveTurns, receiveUpdateMinefields, registerCommand, runCommand, runCommand, send, sendAddEntity, sendAddSquadron, sendAmmoChange, sendArtyAutoHitHexes, sendAttackData, sendCalledShotChange, sendChat, sendCustomInit, sendDeleteEntity, sendDeployMinefields, sendDone, sendGameOptions, sendLoadGame, sendMapDimensions, sendMapSettings, sendModeChange, sendPlanetaryConditions, sendPlayerInfo, sendRerollInitiativeRequest, sendSystemModeChange, sendUnloadStranded, sendUpdateEntity, setName, updateConnection |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
config
BotConfiguration config
BotClient
public BotClient(java.lang.String playerName,
java.lang.String host,
int port)
initialize
public abstract void initialize()
processChat
protected abstract void processChat(GamePlayerChatEvent ge)
initMovement
protected abstract void initMovement()
initFiring
protected abstract void initFiring()
calculateMoveTurn
protected abstract MovePath calculateMoveTurn()
calculateFiringTurn
protected abstract void calculateFiringTurn()
calculateDeployment
protected abstract void calculateDeployment()
calculatePhysicalTurn
protected abstract PhysicalOption calculatePhysicalTurn()
continueMovementFor
protected abstract MovePath continueMovementFor(Entity entity)
calculateMinefieldDeployment
protected abstract java.util.Vector<Minefield> calculateMinefieldDeployment()
calculateArtyAutoHitHexes
protected abstract java.util.Vector<Coords> calculateArtyAutoHitHexes()
getEntitiesOwned
public java.util.ArrayList<Entity> getEntitiesOwned()
getEnemyEntities
public java.util.ArrayList<Entity> getEnemyEntities()
changePhase
public void changePhase(IGame.Phase phase)
- Description copied from class:
Client
- Changes the game phase, and the displays that go along with it.
- Overrides:
changePhase in class Client
calculateMyTurn
protected void calculateMyTurn()
getCoordsAround
protected Coords getCoordsAround(Entity deploy_me,
Coords[] c)
- Gets valid & empty starting coords around the specified point
getStartingCoords
protected Coords getStartingCoords()
getStartingCoordsArray
protected Coords[] getStartingCoordsArray()
getRandomBotMessage
public java.lang.String getRandomBotMessage()
retrieveServerInfo
public void retrieveServerInfo()
- Description copied from class:
Client
- wtf is this? waits for 5 seconds just for nothing?? - itmo fixed this to
be a bit more sensible..
- Overrides:
retrieveServerInfo in class Client