To check if there are four in a row, you just start at the first peice, and move across to the right... If you see a red peice, increment the counter by 1. If you see a peice which is not red, reset the counter to 0. If the counter is then equal to 4, then you have four in a row.
Of course, that only checks for horizontal rows. You will probably need to check for vertical rows if you don't find any hor. ones. And if you don't find any hor. or ver. rows, then you will probably have to check for diagonal ones (which is a bit trickier, but definitely not impossible).This thread may contain some helpful/useful information...