C# Class Belot.Player

This is a base class for all players. Custom implementations (Human or Computer players) must derive from this class.
Afficher le fichier Open project: NikolayIT/BelotGameEngine Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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

Private Methods

Méthode Description
SetPosition ( PlayerPosition position ) : void

Method Details

AnnounceCombination() public abstract méthode

The player has a combination in his cards.
public abstract AnnounceCombination ( CardCombination combination ) : bool
combination CardCombination The combination of cards tha player has
Résultat bool

MakeAnnouncement() public abstract méthode

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
Résultat Announcement

PlayCard() protected abstract méthode

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
Résultat void

Player() protected méthode

Constructor for the class.
protected Player ( ) : System
Résultat System

Player() protected méthode

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

RaiseCardPlayed() protected méthode

Raises the CardsChanged event
protected RaiseCardPlayed ( Card card ) : void
card Card
Résultat void

RaiseCardPlaying() protected méthode

Raises the CardPlaying event
protected RaiseCardPlaying ( PlayingManager manager ) : void
manager PlayingManager
Résultat void

RaiseCardsChanged() protected méthode

Raises the CardsChanged event
protected RaiseCardsChanged ( ) : void
Résultat void