I think we should take a different approach here. Instead of checking the whole board each time we place a piece, we really only need to check if the new piece created a winning condition.

So, just pass in the row, col tuple of the new piece, its color, and then check 3 spaces in either left, right or down direction to see if the color matches.