city.owner drives _pi (the parallel-city-slot player row). _make_city never set owner, so _pi stayed -1 and found()/set_population addressed an invalid row — city population silently stayed at the default 1, breaking every happiness assertion (e.g. balanced/1city/pop3 gave -4 instead of -6; citizen contributions collapsed to -1/0). Set owner = 0 so the slot resolves. Production code is fine (real cities always have an owner). GUT: test_happiness_turn 24 → 4 failing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| game | ||
| packages | ||
| simulator | ||