public static IMtgCard ToMtgCard(MtgJsonCard card) { return(new MtgCard { Cmc = !string.IsNullOrEmpty(card.Cmc) ? double.Parse(card.Cmc) : 0D, Colors = card.Colors, ImageName = card.ImageName, Layout = card.Layout, ManaCost = card.ManaCost, Name = card.Name.Replace("\"", ""), Power = card.Power, SubTypes = card.SubTypes, Text = card.Text, Toughness = card.Toughness, Type = card.Type, Types = card.Types, Legality = card.Legality?.Select(ToMtgLegality).ToList() }); }
IMtgCard ConvertToCard(MtgJsonCard card) { return(MtgJsonCard.ToMtgCard(card)); }