So I'm trying to make a fun and simple little game of Blackjack using C#. I've got a lot of it working how I want it to, except my shuffle routine doesn't seem to be doing anything. What do I need to change in my shuffle routine so that it'll actually shuffle my cards instead of giving me the same cards everytime? Here's what it looks like: Let me know if you need more or the rest of the code in order to find the error(s). THanks in advance!
public void shuffle()
{
List<Card> shufCards = new List<Card>(52);
Random rand = new Random();
for (int i = 52; i > 1; i--)
{
int c = rand.Next(cards.Count);
shufCards.Add(cards[c]);
cards.RemoveAt(c);
}
shufCards.Add(cards[0]);
cards = shufCards;
}
-Matt