mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
AIGateway cbc static methods refactoring
This commit is contained in:
@@ -586,7 +586,7 @@ void AIGateway::initGameInterface(std::shared_ptr<Environment> env, std::shared_
|
|||||||
|
|
||||||
nullkiller->init(CB, this);
|
nullkiller->init(CB, this);
|
||||||
|
|
||||||
memorizeVisitableObjs(nullkiller->memory, nullkiller->dangerHitMap, playerID, TODO);
|
memorizeVisitableObjs(nullkiller->memory, nullkiller->dangerHitMap, playerID, cbc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AIGateway::yourTurn(QueryID queryID)
|
void AIGateway::yourTurn(QueryID queryID)
|
||||||
@@ -1736,7 +1736,7 @@ void AIGateway::memorizeRevisitableObjs(const std::unique_ptr<AIMemory> & memory
|
|||||||
|
|
||||||
void AIGateway::pickBestArtifacts(const std::shared_ptr<CCallback> & cbc, const CGHeroInstance * h, const CGHeroInstance * other)
|
void AIGateway::pickBestArtifacts(const std::shared_ptr<CCallback> & cbc, const CGHeroInstance * h, const CGHeroInstance * other)
|
||||||
{
|
{
|
||||||
auto equipBest = [](const CGHeroInstance * h, const CGHeroInstance * otherh, bool giveStuffToFirstHero) -> void
|
auto equipBest = [cbc](const CGHeroInstance * h, const CGHeroInstance * otherh, bool giveStuffToFirstHero) -> void
|
||||||
{
|
{
|
||||||
bool changeMade = false;
|
bool changeMade = false;
|
||||||
std::set<std::pair<ArtifactInstanceID, ArtifactInstanceID> > swappedSet;
|
std::set<std::pair<ArtifactInstanceID, ArtifactInstanceID> > swappedSet;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ using namespace Goals;
|
|||||||
BuildThis::BuildThis(BuildingID Bid, const CGTownInstance * tid)
|
BuildThis::BuildThis(BuildingID Bid, const CGTownInstance * tid)
|
||||||
: ElementarGoal(Goals::BUILD_STRUCTURE)
|
: ElementarGoal(Goals::BUILD_STRUCTURE)
|
||||||
{
|
{
|
||||||
// FIXME: Remove this constructor (the parent constructor BuildThis::BuildThis)
|
// FIXME: Mircea: Remove this constructor (the parent constructor BuildThis::BuildThis)
|
||||||
// Seems like StartupBehavior is instantiating via this BuildThis constructor
|
// Seems like StartupBehavior is instantiating via this BuildThis constructor
|
||||||
// Or needs to be unit tested to ensure there's no problem with the limited constructor params
|
// Or needs to be unit tested to ensure there's no problem with the limited constructor params
|
||||||
buildingInfo = BuildingInfo(
|
buildingInfo = BuildingInfo(
|
||||||
|
|||||||
Reference in New Issue
Block a user