(svn r13656) [NoAI] -Add: added suspend control. If an AI consumes N (default = 4000) opcodes, a sleep is forced (for 1 tick). This to give fair play for all AIs. Also, an infinite loop won't hang the GUI of the player. (Morloth)
/* $Id$ */
/** @file ai.h Base functions for all AIs. */
#ifndef AI_H
#define AI_H
#include "api/ai_event_types.hpp"
bool AI_StartNewAI(PlayerID player);
void AI_PlayerDied(PlayerID player);
void AI_RunGameLoop();
void AI_Initialize();
void AI_KillAll();
void AI_Uninitialize();
bool AI_AllowNewAI();
void AI_ForceAI(const char *forced_ai);
void AI_Event(PlayerID player, AIEvent *event);
char *AI_GetConsoleList(char *p, const char *last);
bool AI_ImportLibrary(const char *library, const char *class_name, int version, HSQUIRRELVM vm);
void AI_Rescan();
void CcAI(bool success, TileIndex tile, uint32 p1, uint32 p2);
class AIController *AI_GetPlayerController(PlayerID player);
#endif /* AI_H */