C# 클래스 Belot.PlayingManager

A manager that observes playing rules.
파일 보기 프로젝트 열기: NikolayIT/BelotGameEngine 1 사용 예제들

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