/// <summary> /// 这是Knut重排算法的实现 /// </summary> /// <param name="number"></param> /// <returns></returns> private int[] ShuffeArray(int[] number) { int[] newArray = number.Clone() as int[]; for (int i = 0; i < newArray.Length; i++) { int tmp = newArray[i]; int r = Random.Range(i,newArray.Length); newArray[i] = newArray[r]; newArray[r] = tmp; } return newArray; }