calculate winner with three in a row