/* old code */
static bool IsDead(CompanyID slot)
{
if (slot == OWNER_DEITY) {
return Game::GetInstance() == NULL || Game::GetInstance()->IsDead();
} else {
return !Company::IsValidAiID(slot) || Company::Get(slot)->ai_instance->IsDead();
}
}
/* new code function 1 */
static bool IsStarted(CompanyID slot)
{
if (slot == OWNER_DEITY) {
return !Game::GetInstance() == NULL;
} else {
return Company::IsValidAiID(slot);
}
}
/* new code function 2 */
static bool IsDead(CompanyID slot)
{
assert (IsStarted(slot));
if (slot == OWNER_DEITY) {
return Game::GetInstance()->IsDead();
} else {
return Company::Get(slot)->ai_instance->IsDead();
}
}