Hi,
I would use ArrayMaker:
https://hutonggames.fogbugz.com/default.asp?W715 maintain Lists of all your possible lines, and when a block is on a final position, inject that block reference into the appropriate list. then it's either case of checking the number of items on a list or going through the list content and validate that the blocks matches.
you can also take a more harcoded approach, like for Tetris, everytime a block is reaching it's final position, go over each line starting from the left block and if it matches the block on its right, you record them block as potential blocks for clearance, if the next block is still matching, then it will be cleaned up, if not, you lower the clearance flag and keep checking for the next item until the line if done, and then you do the same for the next line.
The other option would be to search the web for some proper algorythm, maybe a solution exists already to ease that process already.
bye,
Jean