Demographics report, population ranking question
Posted: Sat May 30, 2026 2:32 am
I have 1 city size 6, and the Japanese (who have shared vision with me) have 4 cities sized 3,2,1,1 (total 7). When I do the demographics report it shows me as #1 in population, which seems wrong. Digging into the code, it's because of this code in common/city.c
Why is it essentially squaring the size of the city? Is this a bug or am I missing something?
Code: Select all
/**********************************************************************//**
Returns how many thousand citizen live in this city.
**************************************************************************/
int city_population(const struct city *pcity)
{
/* Sum_{i=1}^{n} i == n*(n+1)/2 */
return city_size_get(pcity) * (city_size_get(pcity) + 1) * 5;
}