win conditions in a for loop