BWAPI
|
#include <Producer.h>
Public Member Functions | |
bool | checkCanProduce (BWAPI::UnitType t) |
bool | checkCanTech (BWAPI::TechType t) |
bool | checkCanUpgrade (BWAPI::UpgradeType t) |
bool | checkHaveTech (BWAPI::UnitType ut) |
int | willProduce (BWAPI::UnitType t) |
void | produce (int number, BWAPI::UnitType t, int priority=20, int increment=1) |
void | produceAlways (int number, BWAPI::UnitType t, int increment=1) |
void | produceAdditional (int number, BWAPI::UnitType t, int priority=20, int increment=1) |
void | researchTech (BWAPI::TechType t) |
void | researchUpgrade (BWAPI::UpgradeType t) |
void | update () |
void | onUnitCreate (BWAPI::Unit *unit) |
void | onUnitDestroy (BWAPI::Unit *unit) |
virtual void | onOffer (std::set< BWAPI::Unit * > units) |
virtual void | onRevoke (BWAPI::Unit *unit, double bid) |
virtual std::string | getName () const |
Static Public Member Functions | |
static Producer * | create () |
static void | destroy () |
bool Producer::checkCanProduce | ( | BWAPI::UnitType | t | ) | [inline] |
bool Producer::checkCanTech | ( | BWAPI::TechType | t | ) | [inline] |
bool Producer::checkCanUpgrade | ( | BWAPI::UpgradeType | t | ) | [inline] |
bool Producer::checkHaveTech | ( | BWAPI::UnitType | ut | ) | [inline] |
Producer * Producer::create | ( | ) | [static] |
void Producer::destroy | ( | ) | [static] |
string Producer::getName | ( | ) | const [virtual] |
Implements Arbitrator::Controller< BWAPI::Unit *, double >.
void Producer::onOffer | ( | std::set< BWAPI::Unit * > | units | ) | [virtual] |
Implements Arbitrator::Controller< BWAPI::Unit *, double >.
void Producer::onRevoke | ( | BWAPI::Unit * | unit, |
double | bid | ||
) | [virtual] |
Implements Arbitrator::Controller< BWAPI::Unit *, double >.
void Producer::onUnitCreate | ( | BWAPI::Unit * | unit | ) |
void Producer::onUnitDestroy | ( | BWAPI::Unit * | unit | ) |
void Producer::produce | ( | int | number, |
BWAPI::UnitType | t, | ||
int | priority = 20 , |
||
int | increment = 1 |
||
) |
TODO should raise upgrade (or discard willProduce?)
void Producer::produceAdditional | ( | int | number, |
BWAPI::UnitType | t, | ||
int | priority = 20 , |
||
int | increment = 1 |
||
) |
void Producer::produceAlways | ( | int | number, |
BWAPI::UnitType | t, | ||
int | increment = 1 |
||
) |
void Producer::researchTech | ( | BWAPI::TechType | t | ) |
void Producer::researchUpgrade | ( | BWAPI::UpgradeType | t | ) |
void Producer::update | ( | ) | [virtual] |
hack for the start (to add the first Nexus) because units does not exist in the cstor
Produce Archons if needed
Free merging archons if merged or taking too long
Filter out all producing/tech structures in construction that just finished
Organize/order supply to avoid supply block
Research Techs/Upgrades
Techs
Upgrades
Build more producing structures
Find buildings free to produce units
Launch new units productions
Remove train orders that have been passed from the _productionQueue
Add the default productions
Check if we want to produce units from the "always have" numbers asked
Implements Arbitrator::Controller< BWAPI::Unit *, double >.
int Producer::willProduce | ( | BWAPI::UnitType | t | ) |