public IActionResult CardTrader(Player current) { ViewBag.PlayerID = current.PlayerID; List <HeroActionCard> shopcards = _data.AllShopCards(); return(View("CardCase", shopcards)); }
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()); }