10 #include "controller.h" 11 #include "modules/gatherer/gathererassignments.h" 22 using SharedController::SharedController;
28 virtual const char*
getName()
const override {
Game state.
Definition: state.h:42
virtual bool keepUnit(State *, Unit *worker) const override
Decide whether to keep a unit.
Definition: gathererc.cpp:36
virtual void removeUnit(State *, Unit *worker, UpcId) override
Remove a unit from this controller.
Definition: gathererc.cpp:30
std::vector< Unit * > invaders
Definition: gathererc.h:36
virtual void step(State *) override
Advance controller state and produce UPCs.
Definition: gatherermicro.cpp:109
void attack(State *, Unit *worker, Unit *target)
Issue a UPC to command a worker to attack a unit.
Definition: gatherermicro.cpp:522
Assigns workers to resources for optimal gathering.
Definition: gathererassignments.h:18
virtual const char * getName() const override
A name for this Controller, for debugging purposes.
Definition: gathererc.h:28
bool wasProxied
True if we have ever been proxied (an enemy attempted to build structures in or near our base...
Definition: gathererc.h:41
std::vector< Unit * > bastions
Definition: gathererc.h:37
void gather(State *, Unit *worker, Unit *resource, bool dropResources=false)
Issue a UPC to command a worker to gather a resource.
Definition: gatherermicro.cpp:452
Represents a unit in the game.
Definition: unitsinfo.h:35
void flee(State *, Unit *worker, Unit *resource)
Issue a UPC to command a worker to flee.
Definition: gatherermicro.cpp:502
std::vector< Unit * > proxies
Definition: gathererc.h:35
virtual void addUnit(State *, Unit *worker, UpcId) override
Add a unit to this controller.
Definition: gathererc.cpp:21
Controls gathering workers for GathererModule.
Definition: gathererc.h:20
std::vector< Unit * > proxyBuilders
Definition: gathererc.h:34
Main namespace for bot-related code.
Definition: areainfo.cpp:17
GathererAssignments assignments
Definition: gathererc.h:30
void micro(State *, Unit *worker, Unit *resource)
Decide what to do with a worker this frame.
Definition: gatherermicro.cpp:313
int UpcId
Definition: basetypes.h:23
void chase(State *, Unit *worker, Unit *target)
Issue a UPC to command a worker to chase an enemy proxy builder, to ensure that they don't do anythin...
Definition: gatherermicro.cpp:513
Base class for Controllers shared between multiple tasks.
Definition: controller.h:216