Пример #1
0
        /// <summary>
        /// Create a game
        /// </summary>
        /// <param name="numPlayers">Number of players</param>
        public CardGame (int numPlayers)
        {
            players = new List<CardPlayer>();
            deck = new CardDeck();            

            // Add Players
            for (int i=0; i< numPlayers; i++)
            {
                players.Add(new CardPlayer());
            }

            // Deal cards
            Deal();
        }
Пример #2
0
 /// <summary>
 /// Copy Constructor
 /// </summary>
 /// <param name="cd">A card deck that this deck will duplicate</param>
 public CardDeck (CardDeck cd)
 {
     cards = new List<PlayingCard>(cd.cards);
 }