megamek.client.bot
Class BotClient

java.lang.Object
  extended by megamek.client.Client
      extended by megamek.client.bot.BotClient
All Implemented Interfaces:
IClientCommandHandler
Direct Known Subclasses:
TestBot

public abstract class BotClient
extends Client


Nested Class Summary
 class BotClient.CalculateBotTurn
           
(package private)  class BotClient.FitnessComparator
           
 
Field Summary
(package private)  BotConfiguration config
           
 
Fields inherited from class megamek.client.Client
bots, CLIENT_COMMAND, game, local_pn, phaseReport, roundReport
 
Constructor Summary
BotClient(java.lang.String playerName, java.lang.String host, int port)
           
 
Method Summary
protected abstract  java.util.Vector<Coords> calculateArtyAutoHitHexes()
           
protected abstract  void calculateDeployment()
           
protected abstract  void calculateFiringTurn()
           
protected abstract  java.util.Vector<Minefield> calculateMinefieldDeployment()
           
protected abstract  MovePath calculateMoveTurn()
           
protected  void calculateMyTurn()
           
protected abstract  PhysicalOption calculatePhysicalTurn()
           
 void changePhase(IGame.Phase phase)
          Changes the game phase, and the displays that go along with it.
protected abstract  MovePath continueMovementFor(Entity entity)
           
protected  Coords getCoordsAround(Entity deploy_me, Coords[] c)
          Gets valid & empty starting coords around the specified point
 java.util.ArrayList<Entity> getEnemyEntities()
           
 java.util.ArrayList<Entity> getEntitiesOwned()
           
 java.lang.String getRandomBotMessage()
           
protected  Coords getStartingCoords()
           
protected  Coords[] getStartingCoordsArray()
           
protected abstract  void initFiring()
           
abstract  void initialize()
           
protected abstract  void initMovement()
           
protected abstract  void processChat(GamePlayerChatEvent ge)
           
 void retrieveServerInfo()
          wtf is this?
 
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
 

Field Detail

config

BotConfiguration config
Constructor Detail

BotClient

public BotClient(java.lang.String playerName,
                 java.lang.String host,
                 int port)
Method Detail

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