(svn r85) -Add: initial commit of new AI (enable in Patch menu)

-Add: generalised A* Algorithm
-Add: generalised queues (Fifo, Stack, InsSort, BinaryHeap)
This commit is contained in:
truelight
2004-08-20 09:32:32 +00:00
parent 80b1e25b6c
commit 788ace088d
23 changed files with 3688 additions and 27 deletions

View File

@@ -8,6 +8,7 @@
#include "news.h"
#include "saveload.h"
#include "command.h"
#include "ai.h"
extern void StartupEconomy();
@@ -543,13 +544,16 @@ void OnTick_Players()
void RunOtherPlayersLoop()
{
Player *p;
_is_ai_player = true;
FOR_ALL_PLAYERS(p) {
if (p->is_active) {
_current_player = p->index;
AiDoGameLoop(p);
if (_patches.ainew_active)
AiNewDoGameLoop(p);
else
AiDoGameLoop(p);
}
}