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(); }
// 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)); }
public Card CreateCardById(CardIds id, Player owner) => CreateCardById((int)id, owner);
public List <int> GetCardIds() { return(string.IsNullOrEmpty(CardIds) ? new List <int>() : CardIds.Split('#').Select(int.Parse).ToList()); }
public CardData GetCardDataById(CardIds id) => GetCardDataById((int)id);
public Card InstantiateCardById(CardIds id) => InstantiateCardById((int)id);