Fix overpopulation bug when taking abandoned colony.#95
Open
ajkfreelance wants to merge 1 commit intorayfowler:masterfrom
Open
Fix overpopulation bug when taking abandoned colony.#95ajkfreelance wants to merge 1 commit intorayfowler:masterfrom
ajkfreelance wants to merge 1 commit intorayfowler:masterfrom
Conversation
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).
Contributor
Author
|
Note that this bug can be demonstrated with the same savegame as for #78:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).