I'm making a game on a hexagon grid.
A ‘region’ is a list of all the tiles of a certain colour that are connected.
I'm trying to devise a function that will return the ‘holes’ in a region.
The function would take as input an array of tiles, which you can assume are all connected to one another.
The function will return the array of arrays of tiles which are the ‘holes’ in the region.
For example, (see image below) with an input of an array which contains all the tiles coloured red, I want to return something like:
[[(2,3), (2,4), (3,3)], [(3,1)]]
Any advice on a possible approach would be appreciated.