TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Public Member Functions | Public Attributes | List of all members
cherrypi::TacticsTask Class Reference

#include <tactics.h>

Inherits cherrypi::Task.

Public Member Functions

 TacticsTask (int upcId)
 
virtual void update (State *state) override
 
virtual void cancel (State *state) override
 
void setUnits (State *state, std::unordered_set< Unit * > units)
 
virtual const char * getName () const override
 A name for this task, for debugging purposes. More...
 
- Public Member Functions inherited from cherrypi::Task
 Task (UpcId upcId, std::unordered_set< Unit * > units={})
 
virtual ~Task ()
 
TaskStatus status () const
 
void setStatus (TaskStatus status)
 
bool finished () const
 
UpcId upcId () const
 UPC id in Blackboard that caused this Task to be spawned. More...
 
std::unordered_set< Unit * > const & units () const
 A set of units occupied performing this task. More...
 
void removeUnit (Unit *unit)
 
virtual std::unordered_set< Unit * > const & proxiedUnits () const
 A set of units occupied performing this task. More...
 

Public Attributes

std::vector< Unit * > myUnits
 
Position targetPos
 
Position averagePos
 
bool isFighting = false
 

Additional Inherited Members

- Protected Member Functions inherited from cherrypi::Task
std::unordered_set< Unit * > & units ()
 
virtual void removeDeadOrReassignedUnits (State *state)
 Remove units that have been assigned to another task and units that have died. More...
 

Constructor & Destructor Documentation

cherrypi::TacticsTask::TacticsTask ( int  upcId)
inline

Member Function Documentation

virtual void cherrypi::TacticsTask::cancel ( State state)
inlineoverridevirtual

Reimplemented from cherrypi::Task.

virtual const char* cherrypi::TacticsTask::getName ( ) const
inlineoverridevirtual

A name for this task, for debugging purposes.

Reimplemented from cherrypi::Task.

void cherrypi::TacticsTask::setUnits ( State state,
std::unordered_set< Unit * >  units 
)
inline
virtual void cherrypi::TacticsTask::update ( State state)
inlineoverridevirtual

Reimplemented from cherrypi::Task.

Member Data Documentation

Position cherrypi::TacticsTask::averagePos
bool cherrypi::TacticsTask::isFighting = false
std::vector<Unit*> cherrypi::TacticsTask::myUnits
Position cherrypi::TacticsTask::targetPos

The documentation for this class was generated from the following file: