Example #1
0
        public void PopulateCards(IEnumerable <YugiohCard> allCards)
        {
            Cards = allCards
                    .Join(CardIds,
                          ygoCard => ygoCard.Id,
                          cardId => cardId.Id,
                          (ygoCard, cardId) => ygoCard)
                    .ToList();

            Sections = CardIds.Select(c => c.Section).Distinct().ToList();
        }
Example #2
0
        // GET: /<controller>/
        public IActionResult HerEdit(string id)
        {
            AppSettings appSettings = heritageRepository.GetAppSettings(_config);

            CardIds           cardIds = heritageRepository.GetLevelsAsIntList(id);
            HeritageViewModel model   = heritageRepository.GetHerEditModelByLevels(cardIds);

            //model.user_id = 2;
            //model.lName = "albert";
            return(View("HerEdit", model));
        }
Example #3
0
 public Card CreateCardById(CardIds id, Player owner) => CreateCardById((int)id, owner);
Example #4
0
 public List <int> GetCardIds()
 {
     return(string.IsNullOrEmpty(CardIds)
       ? new List <int>()
       : CardIds.Split('#').Select(int.Parse).ToList());
 }
Example #5
0
 public CardData GetCardDataById(CardIds id) => GetCardDataById((int)id);
Example #6
0
 public Card InstantiateCardById(CardIds id) => InstantiateCardById((int)id);