10 #include "buildtype.h" 25 namespace builderhelpers {
35 BuildType
const* type);
46 std::vector<Position>
const& seeds,
47 BuildType
const* type,
52 std::vector<Position>
const& seeds,
53 BuildType
const* type,
55 std::function<
double(State*,
const BuildType*,
const Tile*)> scoreFunc);
63 const BuildType* type,
65 bool ignoreReserved =
false,
66 bool logFailure =
false);
86 BuildType
const* type,
109 const BuildType* type,
110 const std::vector<Position>& candidateLocations,
111 bool isExpansion =
true);
119 std::list<std::pair<Position, int>>
131 BuildType
const* type,
133 Unit* builder =
nullptr);
std::vector< Position > buildLocationSeeds(State *state, BuildType const *type, UPCTuple const &upc, Unit *builder)
Produce seed locations for the building.
Definition: builderhelper.cpp:630
bool canBuildAt(State *state, const BuildType *type, const Position &pos, bool ignoreReserved, bool logFailure)
Check whether the building can be constructed at specified location.
Definition: builderhelper.cpp:256
replayer::Unit Unit
Definition: state.h:36
std::vector< Position > candidateExpansionResourceDepotLocations(State *state)
Use map information to produce candidate resource depot locations sorted by their proximity to the ma...
Definition: builderhelper.cpp:583
Position findRefineryLocation(State *state, BuildType const *type, UPCTuple const &upc)
Find Vespene Geyser location for a refinery.
Definition: builderhelper.cpp:484
Position findBuildLocation(State *state, std::vector< Position > const &seeds, BuildType const *type, UPCTuple const &upc, ScoreFunc &&scoreFunc)
Definition: builderhelper.cpp:149
bool checkCreepAt(State *state, const BuildType *type, const Position &pos)
Check whether there is enough creep for the building at the specified position.
Definition: builderhelper.cpp:410
void fullUnreserve(TilesInfo &tt, BuildType const *type, Position const &pos)
Clears Tile::reservedAsUnbuildable to free the tiles occupied by a given building type when placed at...
Definition: builderhelper.cpp:768
std::string buildLocationMasks(State *state, const BuildType *type, const Position &pos)
Produces string representation of masks (buildable, building, reservedAsUnbuildable, resourceDepotUnbuildable, reservedForResourceDepot) around the provided build location.
Definition: builderhelper.cpp:671
void fullReserve(TilesInfo &tt, BuildType const *type, Position const &pos)
Sets Tile::reservedAsUnbuildable to reserve the tiles occupied by a given building type when placed a...
Definition: builderhelper.cpp:764
std::shared_ptr< UPCTuple > upcWithPositionForBuilding(State *state, UPCTuple const &upc, BuildType const *type)
Refine a building UPC by selecting a dirac location according.
Definition: builderhelper.cpp:88
Main namespace for bot-related code.
Definition: areainfo.cpp:17
std::list< std::pair< Position, int > > candidateExpansionResourceDepotLocationsDistances(State *state)
Use map information to produce candidate resource depot locations sorted by their proximity to the ma...
Definition: builderhelper.cpp:597
Position findResourceDepotLocation(State *state, const BuildType *type, const std::vector< Position > &candidateLocations, bool isExpansion)
Find location for a new resource depot.
Definition: builderhelper.cpp:559
Unit * findGeyserForRefinery(State *state, BuildType const *type, UPCTuple const &upc)
Find a free Vespene Geyser for a refinery.
Definition: builderhelper.cpp:442
Vec2T< int > Position
Definition: basetypes.h:178