public void ShuffleCards() { Random random = new Random(); for (int i = 0; i < AllCards.Count; i++) { var temp = AllCards[i]; AllCards.RemoveAt(i); AllCards.Insert(random.Next(AllCards.Count), temp); } }