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

Move Command CommonGuards to required interface property #137

Open
DavidRieman opened this issue Oct 18, 2021 · 0 comments
Open

Move Command CommonGuards to required interface property #137

DavidRieman opened this issue Oct 18, 2021 · 0 comments
Labels
enhancement This task is adding new behavior or performing other refactoring improvements.

Comments

@DavidRieman
Copy link
Owner

It's weird that every Action has to have a Guards section but then also always calls VerifyCommonGuards. VerifyCommonGuards feels like something that should happen for us automatically before even Guards is called. This could happen if the ActionGuards list was something that the GameAction class required us to provide publicly on the derived classes.

(It's also questionable whether we should just collapse Guards and Execute, or whether their separation continues to have some value. It's hard to decide what to guard from in Guards and what to defer to Execute, and it usually means making the class hold some data temporarily between the two calls which is not exactly ideal. Consider further exploration / discussion / logging new issue, after making this Guards improvement)

(Relates to #63)

@DavidRieman DavidRieman added the enhancement This task is adding new behavior or performing other refactoring improvements. label Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This task is adding new behavior or performing other refactoring improvements.
Projects
None yet
Development

No branches or pull requests

1 participant