I think the ending depends on how many people are still alive in the end. There's a warning message in the top right corner - something about critical population?