BWAPI
Public Member Functions | Static Public Member Functions | Protected Attributes
Agent Class Reference

#include <Agent.h>

Inheritance diagram for Agent:
Inheritance graph
[legend]
Collaboration diagram for Agent:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Agent (Unit *unit, Environment *env)
virtual ~Agent (void)
bool isType (AgentType)
virtual void initialize ()
virtual void refresh ()
Unit * getUnit ()
UnitType getUnitType ()
Position getUnitPosition ()
Position getTargetPosition ()
void setTargetPosition (Position pos)
bool canAttackAir ()
bool canAttackGround ()
int getAirWeaponDamage ()
int getGroundWeaponDamage ()
int getAirWeaponRange ()
int getGroundWeaponRange ()
ProtectUnitTaskgetProtectUnitTask ()
void setProtectUnitTask (ProtectUnitTask *task)
UnitSet getEnemiesInRange (int range)
UnitSet getEnemiesInRangeAirAttack ()
UnitSet getEnemiesInRangeGroundAttack (bool sieged=false)
Unit * getBestTargetInRange (int range, bool ignoreUnarmed=true)
Unit * getBestTargetInAttackRange (bool ignoreUnarmed=true, bool sieged=false)
void assignTask (Task *task)
TaskgetCurrentTask ()
bool isCurrentTaskType (TaskType type)
int getTaskHeldTime ()
bool isFinished ()
void step ()
virtual void executeUnitBehavior ()
void setDisposition (AgentDisposition disposition)
AgentDisposition getDisposition ()
void setCurrentAptitude (double aptitude)
double getCurrentAptitude ()
void setTempValue (double value)
double getTempValue ()
void setSector (MapSector *sector)
MapSectorgetSector ()
virtual void cleanup ()
virtual void displayInfo (int &row)

Static Public Member Functions

static AgentcreateAgent (Unit *unit, Environment *env)
static AgentMap filterMap (AgentMap *agents, AgentType type, bool finished=true)
static AgentMap filterMap (AgentMap *agents, UnitType type, bool finished=true)
static AgentMap filterMap (AgentMap *agents, TaskType type, bool finished=true)
static AgentclosestAgent (AgentMap *agents, AgentType type, Position pos)
static AgentclosestAgent (AgentMap *agents, UnitType type, Position pos)
static AgentclosestAgent (AgentMap *agents, TaskType type, Position pos)

Protected Attributes

Unit * _unit
Task_currentTask
Environment_env
int _taskHeldFrames
int _taskActionFrame
AgentTypeSet _types
AgentDisposition _disposition
double _currentAptitude
bool _canDoSomethingElse
ProtectUnitTask_protectUnitTask
Position _targetPosition
Position _lastPosition
MapSector_sector
double _tempValue

Constructor & Destructor Documentation

Agent::Agent ( Unit *  unit,
Environment env 
)

Here is the caller graph for this function:

Agent::~Agent ( void  ) [virtual]

Member Function Documentation

void Agent::assignTask ( Task task)

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

void Agent::cleanup ( ) [virtual]

Here is the call graph for this function:

Here is the caller graph for this function:

Agent * Agent::closestAgent ( AgentMap agents,
AgentType  type,
Position  pos 
) [static]

Here is the call graph for this function:

Here is the caller graph for this function:

Agent * Agent::closestAgent ( AgentMap agents,
UnitType  type,
Position  pos 
) [static]

Here is the call graph for this function:

Agent * Agent::closestAgent ( AgentMap agents,
TaskType  type,
Position  pos 
) [static]

Here is the call graph for this function:

Agent * Agent::createAgent ( Unit *  unit,
Environment env 
) [static]

Here is the call graph for this function:

Here is the caller graph for this function:

void Agent::displayInfo ( int &  row) [virtual]

Reimplemented in BaseAgent, ExplorerAgent, WorkerAgent, and AttackerAgent.

Here is the call graph for this function:

Here is the caller graph for this function:

void Agent::executeUnitBehavior ( ) [virtual]

Reimplemented in ExplorerAgent, and WorkerAgent.

Here is the caller graph for this function:

AgentMap Agent::filterMap ( AgentMap agents,
AgentType  type,
bool  finished = true 
) [static]

Here is the call graph for this function:

Here is the caller graph for this function:

AgentMap Agent::filterMap ( AgentMap agents,
UnitType  type,
bool  finished = true 
) [static]

Here is the call graph for this function:

AgentMap Agent::filterMap ( AgentMap agents,
TaskType  type,
bool  finished = true 
) [static]

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Unit * Agent::getBestTargetInAttackRange ( bool  ignoreUnarmed = true,
bool  sieged = false 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Unit * Agent::getBestTargetInRange ( int  range,
bool  ignoreUnarmed = true 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

double Agent::getTempValue ( )

Here is the caller graph for this function:

Unit * Agent::getUnit ( )
Position Agent::getUnitPosition ( )

Here is the caller graph for this function:

UnitType Agent::getUnitType ( )

Here is the caller graph for this function:

void Agent::initialize ( ) [virtual]

Reimplemented in BaseAgent.

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

bool Agent::isType ( AgentType  type)

Here is the caller graph for this function:

void Agent::refresh ( ) [virtual]

Reimplemented in BaseAgent.

Here is the caller graph for this function:

void Agent::setCurrentAptitude ( double  aptitude)
void Agent::setDisposition ( AgentDisposition  disposition)

Here is the caller graph for this function:

Here is the caller graph for this function:

void Agent::setSector ( MapSector sector)

Here is the call graph for this function:

Here is the caller graph for this function:

void Agent::setTargetPosition ( Position  pos)
void Agent::setTempValue ( double  value)

Here is the caller graph for this function:

void Agent::step ( )

Here is the call graph for this function:


Member Data Documentation

bool Agent::_canDoSomethingElse [protected]
double Agent::_currentAptitude [protected]
Task* Agent::_currentTask [protected]
Environment* Agent::_env [protected]
Position Agent::_lastPosition [protected]
MapSector* Agent::_sector [protected]
Position Agent::_targetPosition [protected]
int Agent::_taskActionFrame [protected]
int Agent::_taskHeldFrames [protected]
double Agent::_tempValue [protected]
Unit* Agent::_unit [protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines