AI now follows the A* algorithm more closely by using a separate priority queue from the open_set.

This commit is contained in:
Zed A. Shaw 2025-03-30 12:37:34 -04:00
parent 72951f308f
commit 922fbeba0e
9 changed files with 72 additions and 75 deletions

View file

@ -12,15 +12,10 @@ namespace combat {
int active = 0;
for(auto& [entity, enemy_ai] : combatants) {
fmt::println("\n\n==== ENTITY {} has AI:", entity);
enemy_ai.dump();
enemy_ai.set_state("enemy_found", true);
enemy_ai.set_state("in_combat", true);
enemy_ai.update();
fmt::println("\n\n---- AFTER UPDATE:");
enemy_ai.dump();
active += enemy_ai.active();
}