megamek.client.bot
Class TestBot
java.lang.Object
megamek.client.Client
megamek.client.bot.BotClient
megamek.client.bot.TestBot
- All Implemented Interfaces:
- IClientCommandHandler
public class TestBot
- extends BotClient
|
Nested Class Summary |
class |
TestBot.CalculateEntityMove
Used by the function calculateMoveTurn to run each entities movement calculation in a separate thread. |
|
Constructor Summary |
TestBot(java.lang.String name,
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 |
centities
public CEntity.Table centities
chatp
protected ChatProcessor chatp
ignore
protected int ignore
debug
boolean debug
TestBot
public TestBot(java.lang.String name,
java.lang.String host,
int port)
initialize
public void initialize()
- Specified by:
initialize in class BotClient
calculatePhysicalTurn
public PhysicalOption calculatePhysicalTurn()
- Specified by:
calculatePhysicalTurn in class BotClient
calculateMoveTurn
public MovePath calculateMoveTurn()
- Specified by:
calculateMoveTurn in class BotClient
calculateMove
public MoveOption[] calculateMove(Entity entity)
initFiring
protected void initFiring()
- Specified by:
initFiring in class BotClient
calculateWeaponAttacks
protected java.util.ArrayList<AttackOption> calculateWeaponAttacks(Entity en,
Mounted mw,
boolean best_only)
bestAttack
public GAAttack bestAttack(MoveOption es)
bestAttack
public GAAttack bestAttack(MoveOption es,
CEntity target,
int search_level)
attackUtility
public double attackUtility(MoveOption es,
CEntity target)
calculateFiringTurn
public void calculateFiringTurn()
- Specified by:
calculateFiringTurn in class BotClient
initMovement
protected void initMovement()
- consider how to put more pre-turn logic here
- Specified by:
initMovement in class BotClient
processChat
protected void processChat(GamePlayerChatEvent ge)
- Specified by:
processChat in class BotClient
calculateDeployment
protected void calculateDeployment()
- Specified by:
calculateDeployment in class BotClient
continueMovementFor
protected MovePath continueMovementFor(Entity entity)
- Specified by:
continueMovementFor in class BotClient
calculateMinefieldDeployment
protected java.util.Vector<Minefield> calculateMinefieldDeployment()
- Specified by:
calculateMinefieldDeployment in class BotClient
calculateArtyAutoHitHexes
protected PlayerIDandList<Coords> calculateArtyAutoHitHexes()
- Specified by:
calculateArtyAutoHitHexes in class BotClient
deployMinefields
protected void deployMinefields(java.util.Vector<Minefield> deployedMinefields,
int number,
int type)