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

Inherits cherrypi::Task.

Inherited by cherrypi::BuildingHarassTask, and cherrypi::HarassTask.

Public Member Functions

 MasterHarassTask (UpcId upcId, Position nmyLocation, Unit *u)
 
Position const & location () const
 
void update (State *state) override
 
Unitunitp () const
 
Position pos () const
 
virtual void postCommand (State *state, HarassModule *module)=0
 
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 ()
 
virtual void cancel (State *)
 
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...
 

Protected Attributes

Position location_
 

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::MasterHarassTask::MasterHarassTask ( UpcId  upcId,
Position  nmyLocation,
Unit u 
)
inline

Member Function Documentation

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

A name for this task, for debugging purposes.

Reimplemented from cherrypi::Task.

Reimplemented in cherrypi::HarassTask, and cherrypi::BuildingHarassTask.

Position const& cherrypi::MasterHarassTask::location ( ) const
inline
Position cherrypi::MasterHarassTask::pos ( ) const
inline
virtual void cherrypi::MasterHarassTask::postCommand ( State state,
HarassModule module 
)
pure virtual
Unit* cherrypi::MasterHarassTask::unitp ( ) const
inline
void cherrypi::MasterHarassTask::update ( State state)
inlineoverridevirtual

Reimplemented from cherrypi::Task.

Reimplemented in cherrypi::HarassTask, and cherrypi::BuildingHarassTask.

Member Data Documentation

Position cherrypi::MasterHarassTask::location_
protected

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