var shuffledcards = cards.OrderBy(a => Guid.NewGuid()).ToList();
var rnd = new Random();
var randomized = list.OrderBy(item => rnd.Next());
for (int i = 0; i < fruitsList.Count; i++)
{
Fruit fruitCurrentIndex = fruitsList[i];
int randomIndex = Random.Range(i, fruitsList.Count);
fruitsList[i] = fruitsList[randomIndex];
fruitsList[randomIndex] = fruitCurrentIndex;
}
private static Random rng = new Random();
public static void Shuffle<T>(this IList<T> list)
{
int n = list.Count;
while (n > 1) {
n--;
int k = rng.Next(n + 1);
T value = list[k];
list[k] = list[n];
list[n] = value;
}
}