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

refactor interfaces #12

Open
3k-dome opened this issue May 3, 2023 · 2 comments
Open

refactor interfaces #12

3k-dome opened this issue May 3, 2023 · 2 comments

Comments

@3k-dome
Copy link
Owner

3k-dome commented May 3, 2023

Most of the implementations in Road or Settlement, and so on, could be moved into their interfaces as default implementations. Derived classes that need to change those may then override or extend them.

Observable variants of those classes could then call the default method and simply send update notifications on properties that don't send them automatically. For example, an obserable Player class would only need to send property changed events after any resource changes since dictionaries are not observable.

@3k-dome
Copy link
Owner Author

3k-dome commented May 8, 2023

The whole Catan definition thing is really annoying.

public IEnumerable<float> ToVector<TSettlement, TRoad, TDice>(Catan<TSettlement, TRoad, TDice> catan)
    where TSettlement : ISettlement, new()
    where TRoad : IRoad, new()
    where TDice : IDice, new();

@3k-dome
Copy link
Owner Author

3k-dome commented May 8, 2023

image

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