コード例 #1
0
ファイル: MtgJsonCard.cs プロジェクト: lycerius/DeckAlchemist
 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()
     });
 }
コード例 #2
0
 IMtgCard ConvertToCard(MtgJsonCard card)
 {
     return(MtgJsonCard.ToMtgCard(card));
 }