Exemple #1
0
        private void CreatePlayerDeck(int startingDeckSize)
        {
            Debug.Log("Create Player Deck");
            // first establish the group of cards to create the deck with
            List <SampleCard> startingDeckCards = new List <SampleCard>();

            // create the starting cards and add to the group
            for (int i = 0; i < startingDeckSize; i++)
            {
                SampleCard newCard = CreateCard("Card" + i, i);
                startingDeckCards.Add(newCard);
            }
            // now establish our deck with our starting card group
            _playerDeckSystem = new DeckSystem <SampleCard>(startingDeckCards);
            Debug.Log("Deck Draw Pile: " + _playerDeckSystem.DrawPile.Count);
        }
Exemple #2
0
        private static SampleCard CreateCard(string cardName, int value)
        {
            SampleCard newCard = new SampleCard(cardName, value);

            return(newCard);
        }