I have been struggling with making an array to check for matches and then destroy those matching colors that are next to each other. Basically, how would I check each cell of my array to look for a match 3 based on color. In the screenshot below you can see how the block comes down the board and then uses boardarray to store its color based on its location in sheet 0. Then on sheet 1 it stores it UID, which could be used to destroy the matches when they are matching.
The issue I have is that I cannot figure out an check the array for 3 cells that match next to each other then destroy those 3. I did try checking when the block stopped and looked at x-1 and x+1 to see if the colors next to it matched but it never worked right.
Thank you so much in advance for any help!