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

Tracks upgrade development. More...

#include <commandtrackers.h>

Inherits cherrypi::Tracker.

Public Member Functions

 UpgradeTracker (Unit *unit, BuildType const *type, int timeout=15 *4)
 
- Public Member Functions inherited from cherrypi::Tracker
 Tracker (int timeout)
 
virtual ~Tracker ()
 
TrackerStatus status () const
 
void cancel ()
 
bool failed () const
 
bool succeeded () const
 
virtual bool update (State *s)
 Updates the tracker. More...
 

Protected Member Functions

virtual bool updateNotTracking (State *s) override
 Updates the tracker if its status is NotTracking. More...
 
virtual bool updatePending (State *s) override
 Updates the tracker if its status is Pending. More...
 
virtual bool updateOngoing (State *s) override
 Updates the tracker if its status is Ongoing. More...
 

Additional Inherited Members

- Protected Attributes inherited from cherrypi::Tracker
TrackerStatus status_ = TrackerStatus::NotTracking
 
int time_ = 0
 
int timeout_
 

Detailed Description

Tracks upgrade development.

Constructor & Destructor Documentation

cherrypi::UpgradeTracker::UpgradeTracker ( Unit unit,
BuildType const *  type,
int  timeout = 15 * 4 
)

Member Function Documentation

virtual bool cherrypi::UpgradeTracker::updateNotTracking ( State s)
inlineoverrideprotectedvirtual

Updates the tracker if its status is NotTracking.

Returns true if status has changed

Implements cherrypi::Tracker.

bool cherrypi::UpgradeTracker::updateOngoing ( State s)
overrideprotectedvirtual

Updates the tracker if its status is Ongoing.

Returns true if status has changed

Implements cherrypi::Tracker.

bool cherrypi::UpgradeTracker::updatePending ( State s)
overrideprotectedvirtual

Updates the tracker if its status is Pending.

Returns true if status has changed

Implements cherrypi::Tracker.


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