Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make Ship instances persistent. #80
Ship objects being replaced between turns caused problems for myself, and others. For anyone new to python, this update could save a lot of debugging time.
referenced this pull request
Oct 23, 2018
Instead of overriding __new__ (which can be confusing and looks scary), a beginner-friendly-er solution might be changes to _generate instead:
Advantages to this:
Disadvantages to this:
Note that these should both work when using _generate/update_frame/etc.
If someone else could test these cases as verification, I think it's a better solution.
As for the state (__ship) being mutable, I haven't come up with an improvement.