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

Decouple WinboardCommander initialization from WinboardPlayer constructor #354

Open
lrozenblyum opened this issue Sep 11, 2019 · 0 comments
Labels

Comments

@lrozenblyum
Copy link
Owner

lrozenblyum commented Sep 11, 2019

Discovered during #334

At the moment there are several architectural issues.

  1. WinboardPlayer during its construction starts immediately executing a lot of actions on WinboardCommander.
    It's against an OO principle which say that a constructor should not contain logic.

  2. In addition, WinboardLegalIntegrationTest now due to Winboard player construction - simplify #334 initializes commander twice (first time with real object, next time - with an injected object for spying purposes).

  3. Due to the fact WinboardPlayer#initCommander updates commander field, we cannot make it final

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant