I am looking for code or an explanation of how to go about writing code that will find all the tiles of the same type and that touch a specific 2d grid point.
IE, I am making a 2d grid tiling game and am not quite sure the best way to find all the grid squares that should be removed when the player wants to remove 3 or more touching, similar tiles.
I could iterate through the grid flagging tiles over and over until I don’t find anymore touching tiles but that seems like it may not be the most efficient way.
Any help would be appreciated.
Thanks!
Gullie667