C# Класс Belot.PlayingManager

A manager that observes playing rules.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Add void
CheckBelotForValidColor void
CheckForBelotCombination void
DetermineCurrentHandWinner Player
GetBiggestCard Card
GetBiggestCard Card
GetLastHand Hand
GetPlayingColor CardColor
GetTrumpColor CardColor
HasBigger bool
HasPlayingColor bool
IsBigger bool
PlayingManager System

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

Метод Описание
GetBiggestCard ( ) : Card

Gets the current biggest card in hand. Null if hand is empty

GetPartner ( Player askingPlayer ) : Player

Gets the partner of the a player

GetPlayerWhoPlayedCard ( Card card ) : Player

Gets the player who played a given card

IsValid ( Player player, Card card ) : bool

If card played by this player is valid according to game rules

Приватные методы

Метод Описание
Add ( Player player, Card card ) : void
CheckBelotForValidColor ( Player player, Card playedCard, CardsCollection foundCards ) : void
CheckForBelotCombination ( Player player, Card playedCard ) : void
DetermineCurrentHandWinner ( ) : Player
GetBiggestCard ( Hand currentHand ) : Card
GetBiggestCard ( Hand currentHand, CardColor trumpColor ) : Card
GetLastHand ( ) : Hand
GetPlayingColor ( Hand currentHand ) : CardColor
GetTrumpColor ( ) : CardColor
HasBigger ( Card biggestCard, CardsCollection cards, CardColor wantedColor ) : bool
HasPlayingColor ( CardColor color, CardsCollection cards ) : bool
IsBigger ( Card card, Card biggestCard ) : bool
PlayingManager ( Announcement current, BelotGame game, CardsCollection _allCards ) : System

Constructor for the class

Описание методов

GetBiggestCard() публичный Метод

Gets the current biggest card in hand. Null if hand is empty
public GetBiggestCard ( ) : Card
Результат Card

GetPartner() публичный Метод

Gets the partner of the a player
public GetPartner ( Player askingPlayer ) : Player
askingPlayer Player
Результат Player

GetPlayerWhoPlayedCard() публичный Метод

Gets the player who played a given card
public GetPlayerWhoPlayedCard ( Card card ) : Player
card Card the card to check for
Результат Player

IsValid() публичный Метод

If card played by this player is valid according to game rules
public IsValid ( Player player, Card card ) : bool
player Player
card Card
Результат bool