public void Shuffle(Random rand) { for (int i = 0; i < card_set.Count; i++) { Card c = card_set[i]; int index = rand.Next(card_set.Count - i) + i; card_set[i] = card_set[index]; card_set[index] = c; } }
public void ResetShoe() { shoe.Clear(); int decks = rules.Decks; for (int i = 0; i < decks; i++) { shoe.Add(CardsFactory.StandardDeck); } shoe.Shuffle(random); agent.ResetShoe(this); }