using System.Collections.Generic;
public static void Main()
Console.WriteLine("Lets Play Cards!");
Deck myDeck = new Deck();
Console.WriteLine("Show the whole deck:");
Console.WriteLine("Shuffle the deck:");
private const int LENGTH_OF_SUIT = 10;
private List<Card> deckList = new List<Card>();
foreach (Suit suit in Enum.GetValues(typeof(Suit)))
for(int number = 1 ; number <= LENGTH_OF_SUIT; number ++)
deckList.Add(new Card(suit, number));
Random rand = new Random();
int maxSwaps = rand.Next(10,50);
for(int swapOperation = 0 ; swapOperation < maxSwaps ; swapOperation ++)
int from = rand.Next(deckList.Count);
int to = rand.Next(deckList.Count);
Card temp = deckList[to];
deckList[to] = deckList[from];
foreach(var card in deckList)
Console.WriteLine("{0} {1} = {2}", card.Suit, card.Number, card.Value);
public Suit Suit { get; private set; }
public int Number { get; private set; }
public Card (Suit suit, int number)
public int Value { get { return (int)Suit * Number; } }