C#C
C#2y ago
Theos

How to find coordinates of a region

Hey, so I have a 2D array of tiles, each tile has a gridPosX, gridPosY, tileTyp, tileTyp can either be red, green
I know the width and height of the grid.

I need to find where the red region of tiles starts and ends, and same for the green region. Red region can either spawn on top, bottom, left or right of the green region.
image.png
Was this page helpful?