Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pitcher.adjToIP() can cause data loss #14

Open
philosofool opened this issue Jun 8, 2020 · 0 comments
Open

Pitcher.adjToIP() can cause data loss #14

philosofool opened this issue Jun 8, 2020 · 0 comments

Comments

@philosofool
Copy link
Owner

philosofool commented Jun 8, 2020

If the end user runs Pitcher.adjToIP(0) the all the attributes of the object are set to zero, after which it is impossible to recover the data. This would be bad. Pitcher.adjToIP() should follow Hitter.adjToPA() in not doing anything when zero is passed.

For me, this raises questions whether every object should store it's initial data and have a restore method that resets it to the state when it was initialized, but that's a future issue/discussion.

philosofool pushed a commit that referenced this issue Jun 9, 2020
Fixed issue 14. The problem was actually not successfully prevented in the Hitter class and I also fixed it there.
philosofool added a commit that referenced this issue Jun 9, 2020
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

No branches or pull requests

1 participant