using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace JAMK.IT { public enum Suites { Spade, Heart, Diamond, Club } public class Card { public Suites Suite { get; set; } public int Number { get; set;} public override string ToString() { return Suite + "#" + Number; } } public class Deck { //properties private List cards; public List Cards { get { return cards; } } public Deck() { cards = new List(); //create 52 cards to the deck foreach (Suites s in Enum.GetValues(typeof(Suites))) { for (int i = 1; i <= 13; i++) { cards.Add(new Card() { Suite = s, Number = i }); } } } } }