15 class MasterHarassTask;
17 class BuildingHarassTask;
59 throw std::runtime_error(
"HarassModule: calling postCommand on base class");
86 std::shared_ptr<MasterHarassTask>
Game state.
Definition: state.h:42
Scouts the enemy's base with a worker.
Definition: harass.h:23
Unit * enemyGeyser(Position const &pos)
Definition: harass.cpp:567
std::vector< Position > getFleePositions(State *state, HarassTask *task)
Definition: harass.cpp:583
BuildPolicy()
Definition: harass.h:28
void setBuildPolicy(BuildPolicy pol)
Definition: harass.h:67
Definition: harass.cpp:59
Definition: harass.cpp:86
bool attackWorkers(State *state, HarassTask *htask)
Definition: harass.cpp:373
std::unordered_map< Position, Unit * > enemyGeyser_
Definition: harass.h:99
bool turnAroundGeyser
Definition: harass.h:50
bool attackWorkers
Definition: harass.h:42
bool attack(State *state, HarassTask *htask)
Definition: harass.cpp:346
std::shared_ptr< MasterHarassTask > createTask(State *, UpcId, std::shared_ptr< UPCTuple >)
Definition: harass.cpp:533
bool cancelRefinery
Definition: harass.h:31
bool buildRefinery
Definition: harass.h:30
virtual void step(State *s) override
Definition: harass.cpp:270
FleePolicy(bool tag)
Definition: harass.h:49
Represents a unit in the game.
Definition: unitsinfo.h:35
Unit * enemyRefinery(Position const &pos)
Definition: harass.cpp:575
FleePolicy fleePolicy_
Definition: harass.h:92
void checkEnemyRefineryBuilt(State *state, Position const &nmyLoc)
Definition: harass.cpp:643
bool dangerousAttack(State *state, HarassTask *task)
Definition: harass.cpp:503
bool flee(State *state, HarassTask *task)
Definition: harass.cpp:410
bool attackResourceDepot
Definition: harass.h:41
TargetPolicy(bool asd, bool aw)
Definition: harass.h:39
TargetPolicy targetPolicy_
Definition: harass.h:90
std::unordered_map< Position, Unit * > enemyRefinery_
Definition: harass.h:100
TargetPolicy()
Definition: harass.h:38
bool attackResourceDepot(State *state, HarassTask *htask)
Definition: harass.cpp:356
Definition: harass.cpp:23
virtual ~HarassModule()=default
bool exploreEnemyBase(State *state, HarassTask *task)
Definition: harass.cpp:456
Main namespace for bot-related code.
Definition: areainfo.cpp:17
BuildPolicy(bool br, bool cr)
Definition: harass.h:29
void findClosestGeyser(State *state, Position const &nmyLoc)
Definition: harass.cpp:608
BuildPolicy buildPolicy_
Definition: harass.h:91
void consumeUPC(State *state, UpcId upcId, std::shared_ptr< UPCTuple > upc)
Definition: harass.cpp:509
Definition: basetypes.h:41
void setTargetPolicy(TargetPolicy pol)
Definition: harass.h:64
int UpcId
Definition: basetypes.h:23
void setFleePolicy(FleePolicy pol)
Definition: harass.h:70
Interface for bot modules.
Definition: module.h:30
void postCommand(State *state, MasterHarassTask *htask)
Definition: harass.h:58
FleePolicy()
Definition: harass.h:48