Bridge.Domain.Deck.GetCard C# (CSharp) Method

GetCard() public method

Gets the first matching card in the deck matching the specified suit and rank.
public GetCard ( Rank rank, Suit suit ) : Card
rank Rank The rank to match.
suit Suit The suit to match.
return Card
        public Card GetCard(Rank rank, Suit suit)
        {
            return Cards.FirstOrDefault(card => (card.Rank == rank) && (card.Suit == suit));
        }

Same methods

Deck::GetCard ( int number, Suit suit ) : Card