|
ProtoBot
|
The EconomyManager is responsible for the assignment of workers to be able to farm optimally across the nexus's ProtoBot creates over the course of a game. Each nexus has a defined NexusEconomy that implements a resource farming algorithm to optimally schedule workers to gather resources. More...
#include <EconomyManager.h>
Public Member Functions | |
| EconomyManager (ProtoBotCommander *commanderReference) | |
| void | onStart () |
| void | onFrame () |
| void | onUnitDestroy (BWAPI::Unit unit) |
| void | assignUnit (BWAPI::Unit unit) |
| std::vector< NexusEconomy > | getNexusEconomies () |
| BWAPI::Unitset | getWorkersToTransfer (int numberOfWorkers, NexusEconomy &nexusEconomy) |
| void | resourcesDepletedTranfer (BWAPI::Unitset workers, NexusEconomy &nexusEconomy) |
| BWAPI::Unit | getAvalibleWorker (BWAPI::Position buildLocation) |
| BWAPI::Unit | getUnitScout () |
| void | getMineralsAtBase (BWAPI::TilePosition nexusLocation, NexusEconomy &nexusEconomy) |
| bool | checkRequestAlreadySent (int unitID) |
| bool | workerIsConstructing (BWAPI::Unit) |
Public Attributes | |
| ProtoBotCommander * | commanderReference |
| std::vector< NexusEconomy > | nexusEconomies |
| int | newMinerals |
| int | totalWorkers = 0 |
The EconomyManager is responsible for the assignment of workers to be able to farm optimally across the nexus's ProtoBot creates over the course of a game. Each nexus has a defined NexusEconomy that implements a resource farming algorithm to optimally schedule workers to gather resources.
Definition at line 15 of file EconomyManager.h.
| EconomyManager::EconomyManager | ( | ProtoBotCommander * | commanderReference | ) |
Definition at line 7 of file EconomyManager.cpp.
| void EconomyManager::assignUnit | ( | BWAPI::Unit | unit | ) |
Definition at line 96 of file EconomyManager.cpp.
| bool EconomyManager::checkRequestAlreadySent | ( | int | unitID | ) |
Definition at line 366 of file EconomyManager.cpp.
| BWAPI::Unit EconomyManager::getAvalibleWorker | ( | BWAPI::Position | buildLocation | ) |
Definition at line 267 of file EconomyManager.cpp.
| void EconomyManager::getMineralsAtBase | ( | BWAPI::TilePosition | nexusLocation, |
| NexusEconomy & | nexusEconomy ) |
Definition at line 300 of file EconomyManager.cpp.
| std::vector< NexusEconomy > EconomyManager::getNexusEconomies | ( | ) |
Definition at line 359 of file EconomyManager.cpp.
| BWAPI::Unit EconomyManager::getUnitScout | ( | ) |
Definition at line 290 of file EconomyManager.cpp.
| BWAPI::Unitset EconomyManager::getWorkersToTransfer | ( | int | numberOfWorkers, |
| NexusEconomy & | nexusEconomy ) |
Definition at line 164 of file EconomyManager.cpp.
| void EconomyManager::onFrame | ( | ) |
Definition at line 18 of file EconomyManager.cpp.
| void EconomyManager::onStart | ( | ) |
Definition at line 13 of file EconomyManager.cpp.
| void EconomyManager::onUnitDestroy | ( | BWAPI::Unit | unit | ) |
Definition at line 35 of file EconomyManager.cpp.
| void EconomyManager::resourcesDepletedTranfer | ( | BWAPI::Unitset | workers, |
| NexusEconomy & | nexusEconomy ) |
Definition at line 192 of file EconomyManager.cpp.
| bool EconomyManager::workerIsConstructing | ( | BWAPI::Unit | unit | ) |
Definition at line 371 of file EconomyManager.cpp.
| ProtoBotCommander* EconomyManager::commanderReference |
Definition at line 18 of file EconomyManager.h.
| int EconomyManager::newMinerals |
Definition at line 36 of file EconomyManager.h.
| std::vector<NexusEconomy> EconomyManager::nexusEconomies |
Definition at line 19 of file EconomyManager.h.
| int EconomyManager::totalWorkers = 0 |
Definition at line 37 of file EconomyManager.h.