public bool Contains(Card card, int numberOfCards) { var cards = TreasureSupply.Select(x => x.Cards) .Concat(VictorySupply.Select(x => x.Cards)) .Concat(KingdomSupply.Select(x => x.Cards)); return(cards.Select(x => x.FirstOrDefault()) .Count(x => x == card) >= numberOfCards); }
//TODO: needs to be modified //TODO: implement ruins pile public bool Contains(Card card) { var cards = TreasureSupply.Select(x => x.Cards) .Concat(VictorySupply.Select(x => x.Cards)) .Concat(KingdomSupply.Select(x => x.Cards)); return(cards.Select(x => x.FirstOrDefault()) .Contains(card)); }