refactoring how to get the winning position in the columns