mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:35:42 +00:00
Fix iterative deepening AI test construction
This commit is contained in:
@@ -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<const CommandList>();
|
||||
@@ -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
|
||||
} // namespace shardok
|
||||
|
||||
Reference in New Issue
Block a user