cz.cuni.amis.pogamut.defcon.agent.impl
Class DefConAgentController<AGENT extends DefConAgent>

Package class diagram package DefConAgentController
java.lang.Object
  extended by cz.cuni.amis.pogamut.defcon.agent.impl.DefConAgentController<AGENT>
Type Parameters:
AGENT - Controlled agent
All Implemented Interfaces:
IDefConAgentController<AGENT>
Direct Known Subclasses:
DefConAgentLogicController

public class DefConAgentController<AGENT extends DefConAgent>
extends Object
implements IDefConAgentController<AGENT>

Basic implementation of controller, does some basic stuff like assigning of logger

Author:
Radek 'Black_Hand' Pibil

Field Summary
protected  AGENT agent
           
 
Constructor Summary
DefConAgentController()
           
 
Method Summary
 void act(DefConCommand command)
          Simplifies access to IAct.
 void botStopped()
          Called whenever the bot is stopped (has finished) or killed.
 DefConAct getAct()
           
 GameInfo getGameInfo()
          Returns the game info object used to query the game.
 LogCategory getLog()
          Returns user logger.
 DefConWorldView getWorldView()
          Casts worldview into a friendlier type.
 void initializeController(AGENT agent)
          Called during the construction of the DefConAgent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

agent

protected AGENT extends DefConAgent agent
Constructor Detail

DefConAgentController

@Inject
public DefConAgentController()
Method Detail

initializeController

public void initializeController(AGENT agent)
Description copied from interface: IDefConAgentController
Called during the construction of the DefConAgent.

Specified by:
initializeController in interface IDefConAgentController<AGENT extends DefConAgent>

botStopped

public void botStopped()
Description copied from interface: IDefConAgentController
Called whenever the bot is stopped (has finished) or killed.

Use the method to save your work / data collected during the run of the agent.

Specified by:
botStopped in interface IDefConAgentController<AGENT extends DefConAgent>

getWorldView

public DefConWorldView getWorldView()
Casts worldview into a friendlier type.

Returns:
WorldView

getGameInfo

public GameInfo getGameInfo()
Returns the game info object used to query the game.

Returns:

getAct

public DefConAct getAct()

act

public void act(DefConCommand command)
Simplifies access to IAct. No need to use getAct().act().


getLog

public LogCategory getLog()
Returns user logger. This call is equivalent to bot.getLogger().getCategory(USER_LOG_ID).

Returns:


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.