Exemplo n.º 1
0
        //Programos paleidime - sis metodas - 1
        public void ConstructDeck()
        {
            for (int i = 0; i < 52; i++)
            {
                ICard _newcard = new Card();

                do
                {
                    _newcard.Sign = CardSignVariations[random.Next(0, 13)];
                    _newcard.Suit = CardSuitVariations[random.Next(0, 4)];
                }while (DeckOfCards.Exists(x => x.Sign == _newcard.Sign && x.Suit == _newcard.Suit));

                DeckOfCards.Add(_newcard);
            }
        }