C# Class Belot.PlayingManager

A manager that observes playing rules.
Afficher le fichier Open project: NikolayIT/BelotGameEngine Class Usage Examples

Private Properties

Свойство Type Description
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

Méthodes publiques

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

Private Methods

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

Method Details

GetBiggestCard() public méthode

Gets the current biggest card in hand. Null if hand is empty
public GetBiggestCard ( ) : Card
Résultat Card

GetPartner() public méthode

Gets the partner of the a player
public GetPartner ( Player askingPlayer ) : Player
askingPlayer Player
Résultat Player

GetPlayerWhoPlayedCard() public méthode

Gets the player who played a given card
public GetPlayerWhoPlayedCard ( Card card ) : Player
card Card the card to check for
Résultat Player

IsValid() public méthode

If card played by this player is valid according to game rules
public IsValid ( Player player, Card card ) : bool
player Player
card Card
Résultat bool