In adding a new Nurikabe case rule I found that case rules call itself multiple times. If you put a print statement at the start of the get cases function you'll see that it gets printed multiple times in the BlackOrWhite case rule class and the finish room case rule that may or may not be implemented when you view this. I haven't looked too far into it but in the CaseRule.java class the bottom method "dependentElements" seems to be the source of calling it multiple times. Is this really necessary? Running multiple times doesn't seem to change the function of either case rule but it does increase runtime slightly.
Steps to Reproduce
Add print statement at the start of BlackOrWhiteCaseRule.java method "getCases". Then open up any Nurikabe board and use the Black or White case rule.
Expected Behavior
Only run the getCases function once if it isn't absolutely necessary to run it multiple times
Description
In adding a new Nurikabe case rule I found that case rules call itself multiple times. If you put a print statement at the start of the get cases function you'll see that it gets printed multiple times in the BlackOrWhite case rule class and the finish room case rule that may or may not be implemented when you view this. I haven't looked too far into it but in the CaseRule.java class the bottom method "dependentElements" seems to be the source of calling it multiple times. Is this really necessary? Running multiple times doesn't seem to change the function of either case rule but it does increase runtime slightly.
Steps to Reproduce
Add print statement at the start of BlackOrWhiteCaseRule.java method "getCases". Then open up any Nurikabe board and use the Black or White case rule.
Expected Behavior
Only run the getCases function once if it isn't absolutely necessary to run it multiple times
Screenshots
No response
Puzzle Files
No response
Additional Context
No response