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

Add visual indicator for islands, similar to loops #56

Closed
adamburgess opened this issue Aug 29, 2022 · 3 comments · Fixed by #89
Closed

Add visual indicator for islands, similar to loops #56

adamburgess opened this issue Aug 29, 2022 · 3 comments · Fixed by #89

Comments

@adamburgess
Copy link
Contributor

Since islands are invalid, it would be useful to show something when an island is created.

Might be a good idea to filter out islands that are simply two dead ends connected, though...

@gereleth
Copy link
Owner

gereleth commented Aug 29, 2022

An island is basically a disconnected part. And unconnected parts will already have a different color, so they are easier to notice than loops. Unless their random colors turn out to be very similar. I notice this sometimes but not often.

I had some ideas about rerolling new color if it's too similar to a nearby color. But it turns out computing perceptual similarity between colors is a nontrivial task. So this initiative stalled).

@adamburgess
Copy link
Contributor Author

Colours are useful for different parts, but there's a distinction that should be made when you have an part that has no unconnected ends -- this is what I meant by island.

Having an island is invalid, which helps you discount a rotation. e.g. a piece that has two rotations, but one creates an Island, means it has to be the other.

With increasingly large puzzles where you can't see the entire chain of pieces it would be useful to know if you've created an island or not

@gereleth
Copy link
Owner

Ok, I see what you mean. I don't feel much of a personal need for this feature but maybe it's because this isn't implemented and so I've learned to live without)).

This seems related to tracking disconnects or free ends in #52 . When a certain part has no more free ends we'd highlight it as an island.

Both features require tracking some additional data about game state, like which connections are mutual or which tiles have free ends. I'm slowly thinking about ways to do this without introducing too much additional complexity into the already intricate game logic =).

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 a pull request may close this issue.

2 participants