1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

AIGateway cbc static methods refactoring

This commit is contained in:
Mircea TheHonestCTO
2025-08-16 08:49:56 +02:00
parent af14b67bd0
commit 725f5300cc
2 changed files with 3 additions and 3 deletions

View File

@@ -586,7 +586,7 @@ void AIGateway::initGameInterface(std::shared_ptr<Environment> env, std::shared_
nullkiller->init(CB, this);
memorizeVisitableObjs(nullkiller->memory, nullkiller->dangerHitMap, playerID, TODO);
memorizeVisitableObjs(nullkiller->memory, nullkiller->dangerHitMap, playerID, cbc);
}
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)
{
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;
std::set<std::pair<ArtifactInstanceID, ArtifactInstanceID> > swappedSet;

View File

@@ -22,7 +22,7 @@ using namespace Goals;
BuildThis::BuildThis(BuildingID Bid, const CGTownInstance * tid)
: 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
// Or needs to be unit tested to ensure there's no problem with the limited constructor params
buildingInfo = BuildingInfo(