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

Pieces shouldn't be Observers #32

Open
eeoooue opened this issue Jun 9, 2023 · 0 comments · Fixed by #33
Open

Pieces shouldn't be Observers #32

eeoooue opened this issue Jun 9, 2023 · 0 comments · Fixed by #33

Comments

@eeoooue
Copy link
Owner

eeoooue commented Jun 9, 2023

From refactoring.guru

image

Our set of Pieces is known, so we probably don't need the Observer pattern here.
We're currently just using the Observer pattern to refresh the possible moves for each piece after every turn, but we could just do this with straightforward for loops (for each piece on the board, update)

@eeoooue eeoooue linked a pull request Jul 2, 2023 that will close this issue
@eeoooue eeoooue reopened this Jul 3, 2023
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 a pull request may close this issue.

1 participant