static void Main(string[] args) { List <Card> cards = new List <Card>(); CardSorter cardSorter = new CardSorter(); while (Console.OpenStandardInput() != null) { MakeFiveCards(cards); PrintCards(cards); cards.Sort(cardSorter); PrintCards(cards); Console.ReadKey(); } }
static void Main(string[] args) { Deck cardDeck = new Deck(); //Shuffling the Deck cardDeck.Shuffle(); //Sorting the Deck CardSorter sorter = new CardSorter(CardSortType.SuitThenKind); cardDeck.Sort(sorter); //Deal the top card of Deck cardDeck.DrawTopCard(); //Shuffle the Deck cardDeck.Shuffle(); CardSorter cardsorter = new CardSorter(CardSortType.SuitThenKind); cardDeck.Sort(cardsorter); // Keep console open until a key is pressed Console.ReadKey(); }
public void Initialize() { _sorter = new CardSorter(); }