C# Class Bridge.Domain.Deck

Class to represent a deck of cards, or a hand of cards, or any other collection of cards used in the game. I.e. the dealer's deck, or a stack of cards in a solitairre game, or a discard pile.
Afficher le fichier Open project: anorsich/dds.net Class Usage Examples

Méthodes publiques

Méthode Description
Deck ( ) : System.Collections.Generic
GetCard ( Rank rank, Suit suit ) : Card

Gets the first matching card in the deck matching the specified suit and rank.

GetCard ( int number, Suit suit ) : Card

Gets the card in the deck matching the specified integer rank value and the specified suit.

Has ( Rank rank, Suit suit ) : bool

Determines whether [has] [the specified rank].

Has ( int number, Suit suit ) : bool

Determines whether [has] [the specified number].

RemoveCard ( Card card ) : void
ToString ( ) : string

Method Details

Deck() public méthode

public Deck ( ) : System.Collections.Generic
Résultat System.Collections.Generic

GetCard() public méthode

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.
Résultat Card

GetCard() public méthode

Gets the card in the deck matching the specified integer rank value and the specified suit.
public GetCard ( int number, Suit suit ) : Card
number int The number of the rank to match.
suit Suit The suit to match.
Résultat Card

Has() public méthode

Determines whether [has] [the specified rank].
public Has ( Rank rank, Suit suit ) : bool
rank Rank The rank.
suit Suit The suit.
Résultat bool

Has() public méthode

Determines whether [has] [the specified number].
public Has ( int number, Suit suit ) : bool
number int The number.
suit Suit The suit.
Résultat bool

RemoveCard() public méthode

public RemoveCard ( Card card ) : void
card Card
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string