Following on vrinek's idea, how about growing the land (or shrinking the water) so parts you would originally be connected would be disconnected after the land is grown?

This could be done like so:


Define how much do you want to grow the land: 1 hex? 2 hexes? This value is n
Visit all land nodes, and set all their neighbors up to depth n to land nodes (write to a copy, as to not get an infinite loop)
Run your original floodfill algorithm again to determine what is now connected and what is not


How can I detect connected (but logically distinct) bodies of water in a 2D map?
When pulling something up or down why is a resistor used and it not just connected straight to the +V or 0V rail?
