Skip to content

Fix overpopulation bug when taking abandoned colony.#95

Open
ajkfreelance wants to merge 1 commit intorayfowler:masterfrom
ajkfreelance:colony-pop-robust
Open

Fix overpopulation bug when taking abandoned colony.#95
ajkfreelance wants to merge 1 commit intorayfowler:masterfrom
ajkfreelance:colony-pop-robust

Conversation

@ajkfreelance
Copy link
Contributor

Hoping I can persuade adoption of this approach as it eliminates the
entire class of bugs. It is good practice to encapsulate enforcement of
post-conditions, rather than externalize it to all callers (which also
creates code redundancies and induces linkage/exposure to internals of
other objects, such as Planet).

Hoping I can persuade adoption of this approach as it eliminates the
entire class of bugs. It is good practice to encapsulate enforcement of
post-conditions, rather than externalize it to all callers (which also
creates code redundancies and induces linkage/exposure to internals of
other objects, such as Planet).
@ajkfreelance
Copy link
Contributor Author

Note that this bug can be demonstrated with the same savegame as for #78:

  • Pick a system near other and abandon it, e.g. Errai
  • Wait a turn for abandonment to happen
  • Schedule more than 115 colonists to reclaim it (e.g. from Acubens, Arneb, Sadalsuud)
  • Observe overpopulation of the colony on the next turn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant