/* static */ int AI::GetStartNextTime(uint count) { /* Find the first company which doesn't exist yet */ for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) { if (!Company::IsValidID(c)) { if (count == 0) return AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->GetSetting("start_date"); count--; } } /* Currently no AI can be started, check again in a year. */ return DAYS_IN_YEAR; } /* static */ CompanyID AI::GetStartNextCompany(uint count) { /* Find the first company which doesn't exist yet */ for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) { if (!Company::IsValidID(c)) { if (count == 0) return c; count--; } } /* Currently no AI can be started, check again in a year. */ return INVALID_COMPANY; }