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

StrategyBase should throw when an inheritor returns a non-sensical state for cells #7

Open
5 tasks
mmmcaffeine opened this issue Nov 18, 2021 · 0 comments
Labels
enhancement New feature or request exceptions This should throw an exception

Comments

@mmmcaffeine
Copy link
Owner

It would be possible to detect a number of error conditions in the bool?[] returned by sub-classes, and throw an appropriate exception in these scenarios.

We should throw exceptions when:

  • there are more filled cells than the hint calls for
  • there are not enough filled or undetermined cells to fulfil the hint
  • there are runs of cells that are longer than the hint calls for
  • there are less runs of cells than the hint calls for, and not enough undetermined cells to fit the remaining runs
  • there are more runs of cells than the hint calls for (taking into account some runs might get joined)
@mmmcaffeine mmmcaffeine added enhancement New feature or request exceptions This should throw an exception labels Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exceptions This should throw an exception
Projects
None yet
Development

No branches or pull requests

1 participant