C# 클래스 Belot.Player

This is a base class for all players. Custom implementations (Human or Computer players) must derive from this class.
파일 보기 프로젝트 열기: NikolayIT/BelotGameEngine 1 사용 예제들

공개 메소드들

메소드 설명
AnnounceCombination ( CardCombination combination ) : bool

The player has a combination in his cards.

MakeAnnouncement ( AnnouncementManager manager ) : Announcement

The player makes an announcement (bidding). Player has to ask the manager if desired announcement is valid. Otherwise returning invalid announcement throws exception.

보호된 메소드들

메소드 설명
PlayCard ( PlayingManager manager ) : void

The player has to play a card. Player has to ask the manager if desired card is valid. Otherwise returning invalid card throws exception.

Player ( ) : System

Constructor for the class.

Player ( string name ) : System

Constructor for the class. Creates a new player with the specified name.

RaiseCardPlayed ( Card card ) : void

Raises the CardsChanged event

RaiseCardPlaying ( PlayingManager manager ) : void

Raises the CardPlaying event

RaiseCardsChanged ( ) : void

Raises the CardsChanged event

비공개 메소드들

메소드 설명
SetPosition ( PlayerPosition position ) : void

메소드 상세

AnnounceCombination() 공개 추상적인 메소드

The player has a combination in his cards.
public abstract AnnounceCombination ( CardCombination combination ) : bool
combination CardCombination The combination of cards tha player has
리턴 bool

MakeAnnouncement() 공개 추상적인 메소드

The player makes an announcement (bidding). Player has to ask the manager if desired announcement is valid. Otherwise returning invalid announcement throws exception.
public abstract MakeAnnouncement ( AnnouncementManager manager ) : Announcement
manager AnnouncementManager Manager that observes bidding rules
리턴 Announcement

PlayCard() 보호된 추상적인 메소드

The player has to play a card. Player has to ask the manager if desired card is valid. Otherwise returning invalid card throws exception.
protected abstract PlayCard ( PlayingManager manager ) : void
manager PlayingManager Manager that observes playing rules
리턴 void

Player() 보호된 메소드

Constructor for the class.
protected Player ( ) : System
리턴 System

Player() 보호된 메소드

Constructor for the class. Creates a new player with the specified name.
protected Player ( string name ) : System
name string The name of the player
리턴 System

RaiseCardPlayed() 보호된 메소드

Raises the CardsChanged event
protected RaiseCardPlayed ( Card card ) : void
card Card
리턴 void

RaiseCardPlaying() 보호된 메소드

Raises the CardPlaying event
protected RaiseCardPlaying ( PlayingManager manager ) : void
manager PlayingManager
리턴 void

RaiseCardsChanged() 보호된 메소드

Raises the CardsChanged event
protected RaiseCardsChanged ( ) : void
리턴 void