public void shuffle() { Random r = new Random(); for (int n = card_deck.Count - 1; n > 0; --n) { int k = r.Next(n + 1); card temp = card_deck.ElementAt(k); card_deck.ElementAt(n).switchcardval(card_deck.ElementAt(k)); card_deck.ElementAt(k).switchcardval(temp); } }
public void switchcardval(card c) { name = c.getname(); val = c.getval(); }
public void pushcard(card c) { card_deck.Push(c); }
public void switchcardval(card c) { name = c.getname(); val = c.getval(); }
public void pushcard(card c) { card_deck.Push(c); }