BWAPI  4.2.0
An API for interacting with Starcraft: Broodwar (1.16.1)
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
BWAPI::UnitCommand Class Reference

Public Member Functions

 UnitCommand ()=default
 UnitCommand (Unit _unit, UnitCommandType _type, Unit _target, int _x, int _y, int _extra)
 UnitCommand (Unit _unit, UnitCommandType _type)
template<class T , int S>
void assignTarget (Point< T, S > target)
int getSlot () const
Unit getTarget () const
Position getTargetPosition () const
TilePosition getTargetTilePosition () const
TechType getTechType () const
UnitCommandType getType () const
Unit getUnit () const
UnitType getUnitType () const
UpgradeType getUpgradeType () const
bool isQueued () const
bool operator!= (const UnitCommand &other) const
bool operator== (const UnitCommand &other) const

Static Public Member Functions

static UnitCommand attack (Unitunit, Unittarget, bool shiftQueueCommand=false)
static UnitCommand attack (Unitunit, Positiontarget, bool shiftQueueCommand=false)
static UnitCommand build (Unitunit, TilePositiontarget, UnitTypetype)
static UnitCommand buildAddon (Unitunit, UnitTypetype)
static UnitCommand burrow (Unitunit)
static UnitCommand cancelAddon (Unitunit)
static UnitCommand cancelConstruction (Unitunit)
static UnitCommand cancelMorph (Unitunit)
static UnitCommand cancelResearch (Unitunit)
static UnitCommand cancelTrain (Unitunit, int slot=-2)
static UnitCommand cancelUpgrade (Unitunit)
static UnitCommand cloak (Unitunit)
static UnitCommand decloak (Unitunit)
static UnitCommand follow (Unitunit, Unittarget, bool shiftQueueCommand=false)
static UnitCommand gather (Unitunit, Unittarget, bool shiftQueueCommand=false)
static UnitCommand haltConstruction (Unitunit)
static UnitCommand holdPosition (Unitunit, bool shiftQueueCommand=false)
static UnitCommand land (Unitunit, TilePositiontarget)
static UnitCommand lift (Unitunit)
static UnitCommand load (Unitunit, Unittarget, bool shiftQueueCommand=false)
static UnitCommand morph (Unitunit, UnitTypetype)
static UnitCommand move (Unitunit, Positiontarget, bool shiftQueueCommand=false)
static UnitCommand patrol (Unitunit, Positiontarget, bool shiftQueueCommand=false)
static UnitCommand placeCOP (Unitunit, TilePositiontarget)
static UnitCommand repair (Unitunit, Unittarget, bool shiftQueueCommand=false)
static UnitCommand research (Unitunit, TechType tech)
static UnitCommand returnCargo (Unitunit, bool shiftQueueCommand=false)
static UnitCommand rightClick (Unitunit, Positiontarget, bool shiftQueueCommand=false)
static UnitCommand rightClick (Unitunit, Unittarget, bool shiftQueueCommand=false)
static UnitCommand setRallyPoint (Unitunit, Positiontarget)
static UnitCommand setRallyPoint (Unitunit, Unittarget)
static UnitCommand siege (Unitunit)
static UnitCommand stop (Unitunit, bool shiftQueueCommand=false)
static UnitCommand train (Unitunit, UnitTypetype)
static UnitCommand unburrow (Unitunit)
static UnitCommand unload (Unitunit, Unittarget)
static UnitCommand unloadAll (Unitunit, bool shiftQueueCommand=false)
static UnitCommand unloadAll (Unitunit, Positiontarget, bool shiftQueueCommand=false)
static UnitCommand unsiege (Unitunit)
static UnitCommand upgrade (Unitunit, UpgradeType upgrade)
static UnitCommand useTech (Unitunit, TechType tech)
static UnitCommand useTech (Unitunit, TechType tech, Positiontarget)
static UnitCommand useTech (Unitunit, TechType tech, Unittarget)

Public Attributes

int extra = 0
Unit target = nullptr
UnitCommandType type = UnitCommandTypes::None
Unit unit = nullptr
int x = Positions::None.x
int y = Positions::None.y

Constructor & Destructor Documentation

BWAPI::UnitCommand::UnitCommand () default
BWAPI::UnitCommand::UnitCommand (Unit _unit, UnitCommandType _type, Unit _target, int _x, int _y, int _extra )
BWAPI::UnitCommand::UnitCommand (Unit _unit, UnitCommandType _type )

Member Function Documentation

static UnitCommand BWAPI::UnitCommand::attack (Unit unit, Unit target, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::attack (Unit unit, Position target, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::build (Unit unit, TilePosition target, UnitType type ) static
static UnitCommand BWAPI::UnitCommand::buildAddon (Unit unit, UnitType type ) static
static UnitCommand BWAPI::UnitCommand::train (Unit unit, UnitType type ) static
static UnitCommand BWAPI::UnitCommand::morph (Unit unit, UnitType type ) static
static UnitCommand BWAPI::UnitCommand::research (Unit unit, TechType tech ) static
static UnitCommand BWAPI::UnitCommand::upgrade (Unit unit, UpgradeType upgrade ) static
static UnitCommand BWAPI::UnitCommand::setRallyPoint (Unit unit, Position target ) static
static UnitCommand BWAPI::UnitCommand::setRallyPoint (Unit unit, Unit target ) static
static UnitCommand BWAPI::UnitCommand::move (Unit unit, Position target, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::patrol (Unit unit, Position target, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::holdPosition (Unit unit, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::stop (Unit unit, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::follow (Unit unit, Unit target, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::gather (Unit unit, Unit target, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::returnCargo (Unit unit, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::repair (Unit unit, Unit target, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::burrow (Unit unit) static
static UnitCommand BWAPI::UnitCommand::unburrow (Unit unit) static
static UnitCommand BWAPI::UnitCommand::cloak (Unit unit) static
static UnitCommand BWAPI::UnitCommand::decloak (Unit unit) static
static UnitCommand BWAPI::UnitCommand::siege (Unit unit) static
static UnitCommand BWAPI::UnitCommand::unsiege (Unit unit) static
static UnitCommand BWAPI::UnitCommand::lift (Unit unit) static
static UnitCommand BWAPI::UnitCommand::land (Unit unit, TilePosition target ) static
static UnitCommand BWAPI::UnitCommand::load (Unit unit, Unit target, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::unload (Unit unit, Unit target ) static
static UnitCommand BWAPI::UnitCommand::unloadAll (Unit unit, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::unloadAll (Unit unit, Position target, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::rightClick (Unit unit, Position target, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::rightClick (Unit unit, Unit target, bool shiftQueueCommand = false ) static
static UnitCommand BWAPI::UnitCommand::haltConstruction (Unit unit) static
static UnitCommand BWAPI::UnitCommand::cancelConstruction (Unit unit) static
static UnitCommand BWAPI::UnitCommand::cancelAddon (Unit unit) static
static UnitCommand BWAPI::UnitCommand::cancelTrain (Unit unit, int slot = -2 ) static
static UnitCommand BWAPI::UnitCommand::cancelMorph (Unit unit) static
static UnitCommand BWAPI::UnitCommand::cancelResearch (Unit unit) static
static UnitCommand BWAPI::UnitCommand::cancelUpgrade (Unit unit) static
static UnitCommand BWAPI::UnitCommand::useTech (Unit unit, TechType tech ) static
static UnitCommand BWAPI::UnitCommand::useTech (Unit unit, TechType tech, Position target ) static
static UnitCommand BWAPI::UnitCommand::useTech (Unit unit, TechType tech, Unit target ) static
static UnitCommand BWAPI::UnitCommand::placeCOP (Unit unit, TilePosition target ) static
UnitCommandType BWAPI::UnitCommand::getType () const
Unit BWAPI::UnitCommand::getUnit () const
Unit BWAPI::UnitCommand::getTarget () const
Position BWAPI::UnitCommand::getTargetPosition () const
TilePosition BWAPI::UnitCommand::getTargetTilePosition () const
UnitType BWAPI::UnitCommand::getUnitType () const
TechType BWAPI::UnitCommand::getTechType () const
UpgradeType BWAPI::UnitCommand::getUpgradeType () const
int BWAPI::UnitCommand::getSlot () const
bool BWAPI::UnitCommand::isQueued () const
bool BWAPI::UnitCommand::operator== (const UnitCommandother) const
bool BWAPI::UnitCommand::operator!= (const UnitCommandother) const
void BWAPI::UnitCommand::assignTarget (Point< T, S > target)

References x, and y.

Member Data Documentation

Unit BWAPI::UnitCommand::unit = nullptr
UnitCommandType BWAPI::UnitCommand::type = UnitCommandTypes::None
Unit BWAPI::UnitCommand::target = nullptr
int BWAPI::UnitCommand::x = Positions::None.x

Referenced by assignTarget().

int BWAPI::UnitCommand::y = Positions::None.y

Referenced by assignTarget().

int BWAPI::UnitCommand::extra = 0