// TODO override Pile.Push to prevent illegal initialization public Trick GetTrick() { var trumpWasPlayed = _playedCards.Values.Any(card => _trump.IsTrumpCard(card)); var taker = (from pair in _playedCards let player = pair.Key let card = pair.Value where !trumpWasPlayed || _trump.IsTrumpCard(card) orderby card.Rank descending select player).First(); return(new Trick(CardsInPile, taker)); }
public bool HasTrump(Trump trump) => CardsInPile.Any(card => trump.IsTrumpCard(card));