Skip to content

fix: region calculation for puzzles with stones#109

Open
lkaesberg wants to merge 2 commits intosigma144:masterfrom
lkaesberg:fix/num-region-colors
Open

fix: region calculation for puzzles with stones#109
lkaesberg wants to merge 2 commits intosigma144:masterfrom
lkaesberg:fix/num-region-colors

Conversation

@lkaesberg
Copy link

The current implementation looks for how many stones are available in the puzzle, but if there is, for example, a puzzle with a 2x2 grid and 2 blue and 2 yellow stones, there should be only 2 regions and not 4 as the current version calculates. I created a new function that calculates the number of unique colors for a given shape. I think this should be more consistent with the expected behavior.

See also NewSoupVi#35

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 this pull request may close these issues.

1 participant