From 46a060f01d5f6fdc3ad223fa1aeba83741677a91 Mon Sep 17 00:00:00 2001 From: Dan Crosby Date: Tue, 7 Jul 2026 10:42:29 -0700 Subject: [PATCH] Fix iterative deepening AI test construction --- .../shardok/ai/IterativeDeepeningAI_test.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/test/cpp/net/eagle0/shardok/ai/IterativeDeepeningAI_test.cpp b/src/test/cpp/net/eagle0/shardok/ai/IterativeDeepeningAI_test.cpp index b0d286a0ac..57528ec737 100644 --- a/src/test/cpp/net/eagle0/shardok/ai/IterativeDeepeningAI_test.cpp +++ b/src/test/cpp/net/eagle0/shardok/ai/IterativeDeepeningAI_test.cpp @@ -86,8 +86,15 @@ TEST_F(IterativeDeepeningAITest, BasicSearch) { const auto battalionTypeGetter = [this](BattalionTypeId typeId) { return this->settings->GetGetter().GetBattalionType(typeId); }; - const IterativeDeepeningAI - ai(1, false, FleeStrategy, emptyCastleCoords, *scorer, apdCache, battalionTypeGetter); + const IterativeDeepeningAI ai( + 1, + false, + FleeStrategy, + emptyCastleCoords, + *scorer, + apdCache, + battalionTypeGetter, + true); // Test with empty commands first const auto emptyCommands = std::make_shared(); @@ -128,7 +135,8 @@ TEST_F(IterativeDeepeningAITest, EmptyCommandsHandling) { emptyCastleCoords, *scorer, apdCache, - battalionTypeGetter); // Test as defender + battalionTypeGetter, + true); // Test as defender 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"; } -} // namespace shardok \ No newline at end of file +} // namespace shardok