C# 클래스 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.
파일 보기 프로젝트 열기: anorsich/dds.net 1 사용 예제들

공개 메소드들

메소드 설명
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

메소드 상세

Deck() 공개 메소드

public Deck ( ) : System.Collections.Generic
리턴 System.Collections.Generic

GetCard() 공개 메소드

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.
리턴 Card

GetCard() 공개 메소드

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.
리턴 Card

Has() 공개 메소드

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

Has() 공개 메소드

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

RemoveCard() 공개 메소드

public RemoveCard ( Card card ) : void
card Card
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string