Dynamic_Games.PAES.compare_max_Nash C# (CSharp) Method

compare_max_Nash() private method

private compare_max_Nash ( double first, double second, int n ) : int
first double
second double
n int
return int
        int compare_max_Nash(double[] first, double[] second, int n)
        {
            double[] first1;
            double[] second1;
            int k1 = 0;
            int k2 = 0;
            for (int i = 0; i < n; i++)
            {
                first1 = (double[])first.Clone();
                second1 = (double[])second.Clone();
               // first1 = first;
               // second1 = second;
                first1[i] = second[i];
                second1[i] = first[i];
                if (first[i] > first1[i])
                    k1++;
                if (second[i] > second1[i])
                    k2++;
                }
                if (k1 < k2)
                    return -1; //1
                if (k1 > k2)
                    return 1;
               // }
            return 0;
        }