BWAPI  4.1.2
An API for interacting with Starcraft: Broodwar (1.16.1)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules
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)
 
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 (Unit unit, PositionOrUnit target, bool shiftQueueCommand=false)
 
static UnitCommand build (Unit unit, TilePosition target, UnitType type)
 
static UnitCommand buildAddon (Unit unit, UnitType type)
 
static UnitCommand burrow (Unit unit)
 
static UnitCommand cancelAddon (Unit unit)
 
static UnitCommand cancelConstruction (Unit unit)
 
static UnitCommand cancelMorph (Unit unit)
 
static UnitCommand cancelResearch (Unit unit)
 
static UnitCommand cancelTrain (Unit unit, int slot=-2)
 
static UnitCommand cancelUpgrade (Unit unit)
 
static UnitCommand cloak (Unit unit)
 
static UnitCommand decloak (Unit unit)
 
static UnitCommand follow (Unit unit, Unit target, bool shiftQueueCommand=false)
 
static UnitCommand gather (Unit unit, Unit target, bool shiftQueueCommand=false)
 
static UnitCommand haltConstruction (Unit unit)
 
static UnitCommand holdPosition (Unit unit, bool shiftQueueCommand=false)
 
static UnitCommand land (Unit unit, TilePosition target)
 
static UnitCommand lift (Unit unit)
 
static UnitCommand load (Unit unit, Unit target, bool shiftQueueCommand=false)
 
static UnitCommand morph (Unit unit, UnitType type)
 
static UnitCommand move (Unit unit, Position target, bool shiftQueueCommand=false)
 
static UnitCommand patrol (Unit unit, Position target, bool shiftQueueCommand=false)
 
static UnitCommand placeCOP (Unit unit, TilePosition target)
 
static UnitCommand repair (Unit unit, Unit target, bool shiftQueueCommand=false)
 
static UnitCommand research (Unit unit, TechType tech)
 
static UnitCommand returnCargo (Unit unit, bool shiftQueueCommand=false)
 
static UnitCommand rightClick (Unit unit, PositionOrUnit target, bool shiftQueueCommand=false)
 
static UnitCommand setRallyPoint (Unit unit, PositionOrUnit target)
 
static UnitCommand siege (Unit unit)
 
static UnitCommand stop (Unit unit, bool shiftQueueCommand=false)
 
static UnitCommand train (Unit unit, UnitType type)
 
static UnitCommand unburrow (Unit unit)
 
static UnitCommand unload (Unit unit, Unit target)
 
static UnitCommand unloadAll (Unit unit, bool shiftQueueCommand=false)
 
static UnitCommand unloadAll (Unit unit, Position target, bool shiftQueueCommand=false)
 
static UnitCommand unsiege (Unit unit)
 
static UnitCommand upgrade (Unit unit, UpgradeType upgrade)
 
static UnitCommand useTech (Unit unit, TechType tech)
 
static UnitCommand useTech (Unit unit, TechType tech, PositionOrUnit target)
 

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 
)

Member Function Documentation

static UnitCommand BWAPI::UnitCommand::attack ( Unit  unit,
PositionOrUnit  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,
PositionOrUnit  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,
PositionOrUnit  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,
PositionOrUnit  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 UnitCommand other) const
bool BWAPI::UnitCommand::operator!= ( const UnitCommand other) const

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
int BWAPI::UnitCommand::y = Positions::None.y
int BWAPI::UnitCommand::extra = 0