C# Класс Belot.Player

This is a base class for all players. Custom implementations (Human or Computer players) must derive from this class.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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