コード例 #1
0
ファイル: Deck.cs プロジェクト: Latency/HearthStone.Database
 /// <summary>
 /// Converts (DbfId, Count) dictionary to (CardObject, Count).
 /// </summary>
 public Dictionary <Card, int> GetCards() => CardDbfIds.ToDictionary(x => Cards.GetFromDbfId(x.Key), x => x.Value);
コード例 #2
0
 /// <summary>
 /// Converts (DbfId, Count) dictionary to (CardObject, Count).
 /// </summary>
 public Dictionary <Card, int> GetCards() => CardDbfIds
 .Select(x => new { Card = Cards.FromAssetId(x.Key), Count = x.Value })
 .Where(x => x.Card != null).ToDictionary(x => x.Card, x => x.Count);