Esempio n. 1
0
 public static void Configure(AiCoreConfiguration configuration)
 {
     if (running)
     {
         return;
     }
     AiCore.configuration = configuration;
     // cannot be configured if started.
     threads = new AiWorkerThread[configuration.threadCount];
     for (int i = 0; i < configuration.threadCount; i++)
     {
         threads[i] = new AiWorkerThread();
     }
     configured = true;
 }
Esempio n. 2
0
 public static void InitCore(AiCoreConfiguration configuration)
 {
     AiCore.configuration = configuration;
     threads = new AiWorkerThread[configuration.threadCount];
     for (int i = 0; i < configuration.threadCount; i++)
     {
         threads[i] = new AiWorkerThread();
     }
     configured      = true;
     AddListMutex    = new Mutex();
     RemoveListMutex = new Mutex();
     add_list        = new List <AiBrain>();
     remove_list     = new List <AiBrain>();
     BrainMapping    = new Dictionary <AiBrain, int>();
     Console.WriteLine("Initialized AI Core");
 }