Fix iterative deepening AI test construction

This commit is contained in:
2026-07-07 10:42:29 -07:00
parent d874ca42a9
commit 46a060f01d
@@ -86,8 +86,15 @@ TEST_F(IterativeDeepeningAITest, BasicSearch) {
const auto battalionTypeGetter = [this](BattalionTypeId typeId) { const auto battalionTypeGetter = [this](BattalionTypeId typeId) {
return this->settings->GetGetter().GetBattalionType(typeId); return this->settings->GetGetter().GetBattalionType(typeId);
}; };
const IterativeDeepeningAI const IterativeDeepeningAI ai(
ai(1, false, FleeStrategy, emptyCastleCoords, *scorer, apdCache, battalionTypeGetter); 1,
false,
FleeStrategy,
emptyCastleCoords,
*scorer,
apdCache,
battalionTypeGetter,
true);
// Test with empty commands first // Test with empty commands first
const auto emptyCommands = std::make_shared<const CommandList>(); const auto emptyCommands = std::make_shared<const CommandList>();
@@ -128,7 +135,8 @@ TEST_F(IterativeDeepeningAITest, EmptyCommandsHandling) {
emptyCastleCoords, emptyCastleCoords,
*scorer, *scorer,
apdCache, apdCache,
battalionTypeGetter); // Test as defender battalionTypeGetter,
true); // Test as defender
const auto result = ai.IterativeSearch(settings, gameState, empty_commands, budget); const auto result = ai.IterativeSearch(settings, gameState, empty_commands, budget);
@@ -147,4 +155,4 @@ TEST_F(IterativeDeepeningAITest, DepthCapEnforced) {
GTEST_SKIP() << "Skipping test - AttackLocationsCache initialization hangs in test environment"; GTEST_SKIP() << "Skipping test - AttackLocationsCache initialization hangs in test environment";
} }
} // namespace shardok } // namespace shardok