Exemplo n.º 1
0
        public void FillCardShop(int HowManyCards)
        {
            Random rand = new Random();
            List <HeroActionCard> fullLibrary = _data.GetLibrary();

            for (int i = 0; i < HowManyCards; i++)
            {
                _data.AddCardToShop(fullLibrary[rand.Next(0, fullLibrary.Count)]);
            }
        }
Exemplo n.º 2
0
        public List <HeroActionCard> StockCardStore(int numberOfCards)
        {
            Random rand = new Random();

            // Pulls all possbile cards
            List <HeroActionCard> fullLibrary = gameData.GetLibrary();

            // Selects X random cards and adds them to the datbase that holds the cards in the shop
            for (int i = 0; i < numberOfCards; i++)
            {
                gameData.AddCardToShop(fullLibrary[rand.Next(0, fullLibrary.Count)]);
            }

            // Returns all the cards in the database that the store currently has.
            return(gameData.AllShopCards());
        }