Connect 4 Game Help

hello. im making a connect 4 game but cant seem to figure out a way that i can make a block that is a special block that with match to any other kind of block.

currently i use a if statment to check if blocks ‘var myType:uint’ are the same around it. but i cant figure out how i could switch that into a function where there is a wild type

any help is appreciated