AI now follows the A* algorithm more closely by using a separate priority queue from the open_set.
This commit is contained in:
parent
72951f308f
commit
922fbeba0e
9 changed files with 72 additions and 75 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue