public void ShuffleDeck() { if (deck != null) { var currentDeck = deck.GetDeck(); var rand = new Random(); Card tmp; for (int i = 0; i < currentDeck.Count; i++) { tmp = currentDeck[0]; currentDeck.RemoveAt(0); currentDeck.Insert(rand.Next(currentDeck.Count), tmp); } } }