public int move(int row, int col, int player) {
        int value = player == 1 ? 1 : -1;
        
        rows[row] += value;
        cols[col] += value;
        
        if (row == col) diagonal += value;
        if (col == (n - row - 1)) antiDiagonal += value;
        
        if (Math.abs(rows[row]) == n ||
        		Math.abs(cols[col]) == n ||
        		Math.abs(diagonal) == n ||
        		Math.abs(antiDiagonal) == n) {
        	return value == 1 ? 1 : 2;
        }
        
        return 0;
    }