BWAPI::UnitCommand class

Public static functions

static auto attack(UnitID unit, Position target, bool shiftQueueCommand = false) -> UnitCommand
static auto attack(UnitID unit, UnitID target, bool shiftQueueCommand = false) -> UnitCommand
static auto build(UnitID unit, TilePosition target, UnitType type) -> UnitCommand
static auto buildAddon(UnitID unit, UnitType type) -> UnitCommand
static auto burrow(UnitID unit) -> UnitCommand
static auto cancelAddon(UnitID unit) -> UnitCommand
static auto cancelConstruction(UnitID unit) -> UnitCommand
static auto cancelMorph(UnitID unit) -> UnitCommand
static auto cancelResearch(UnitID unit) -> UnitCommand
static auto cancelTrain(UnitID unit, int slot = -2) -> UnitCommand
static auto cancelUpgrade(UnitID unit) -> UnitCommand
static auto cloak(UnitID unit) -> UnitCommand
static auto decloak(UnitID unit) -> UnitCommand
static auto follow(UnitID unit, UnitID target, bool shiftQueueCommand = false) -> UnitCommand
static auto gather(UnitID unit, UnitID target, bool shiftQueueCommand = false) -> UnitCommand
static auto haltConstruction(UnitID unit) -> UnitCommand
static auto holdPosition(UnitID unit, bool shiftQueueCommand = false) -> UnitCommand
static auto land(UnitID unit, TilePosition target) -> UnitCommand
static auto lift(UnitID unit) -> UnitCommand
static auto load(UnitID unit, UnitID target, bool shiftQueueCommand = false) -> UnitCommand
static auto morph(UnitID unit, UnitType type) -> UnitCommand
static auto move(UnitID unit, Position target, bool shiftQueueCommand = false) -> UnitCommand
static auto patrol(UnitID unit, Position target, bool shiftQueueCommand = false) -> UnitCommand
static auto placeCOP(UnitID unit, TilePosition target) -> UnitCommand
static auto repair(UnitID unit, UnitID target, bool shiftQueueCommand = false) -> UnitCommand
static auto research(UnitID unit, TechType tech) -> UnitCommand
static auto returnCargo(UnitID unit, bool shiftQueueCommand = false) -> UnitCommand
static auto rightClick(UnitID unit, Position target, bool shiftQueueCommand = false) -> UnitCommand
static auto rightClick(UnitID unit, UnitID target, bool shiftQueueCommand = false) -> UnitCommand
static auto setRallyPoint(UnitID unit, Position target) -> UnitCommand
static auto setRallyPoint(UnitID unit, UnitID target) -> UnitCommand
static auto siege(UnitID unit) -> UnitCommand
static auto stop(UnitID unit, bool shiftQueueCommand = false) -> UnitCommand
static auto train(UnitID unit, UnitType type) -> UnitCommand
static auto unburrow(UnitID unit) -> UnitCommand
static auto unload(UnitID unit, UnitID target) -> UnitCommand
static auto unloadAll(UnitID unit, bool shiftQueueCommand = false) -> UnitCommand
static auto unloadAll(UnitID unit, Position target, bool shiftQueueCommand = false) -> UnitCommand
static auto unsiege(UnitID unit) -> UnitCommand
static auto upgrade(UnitID unit, UpgradeType upgrade) -> UnitCommand
static auto useTech(UnitID unit, TechType tech) -> UnitCommand
static auto useTech(UnitID unit, TechType tech, Position target) -> UnitCommand
static auto useTech(UnitID unit, TechType tech, UnitID target) -> UnitCommand

Constructors, destructors, conversion operators

UnitCommand() defaulted
UnitCommand(UnitID _unit, UnitCommandType _type)
UnitCommand(UnitID _unit, UnitCommandType _type, UnitID _target, int _x, int _y, int _extra)

Public functions

void assignTarget(Position pos)
void assignTarget(TilePosition tilePos)
auto getSlot() const -> int
auto getTarget() const -> UnitID
auto getTargetPosition() const -> Position
auto getTargetTilePosition() const -> TilePosition
auto getTechType() const -> TechType
auto getType() const -> UnitCommandType
auto getUnit() const -> UnitID
auto getUnitType() const -> UnitType
auto getUpgradeType() const -> UpgradeType
auto isQueued() const -> bool
auto operator!=(const UnitCommand& other) const -> bool
auto operator==(const UnitCommand& other) const -> bool

Public variables

int extra
UnitID target
UnitCommandType type
UnitID unit
int x
int y