Belot.PlayingManager.CheckForBelotCombination C# (CSharp) Метод

CheckForBelotCombination() приватный Метод

private CheckForBelotCombination ( Player player, Card playedCard ) : void
player Player
playedCard Card
Результат void
        private void CheckForBelotCombination( Player player, Card playedCard )
        {
            CardsCollection foundCards = new CardsCollection();
            CardColor trumpColor = GetTrumpColor( );

            if( _currentAnnouncement.Type == AnnouncementTypeEnum.AllTrumps )
            {
                if( _currentHand.IsEmpty )
                {
                    CheckBelotForValidColor( player, playedCard, foundCards );
                }
                else
                {
                    if( playedCard.CardColor == GetPlayingColor( _currentHand ) )
                    {
                        CheckBelotForValidColor( player, playedCard, foundCards );
                    }
                }
            }
            else if( _currentAnnouncement.Type != AnnouncementTypeEnum.NoTrumps && playedCard.CardColor == trumpColor )
            {
                CheckBelotForValidColor( player, playedCard, foundCards );
            }

            if( foundCards.Count != 0 )
            {
                BelotFound( player, new BelotCombination( foundCards, 20) );
            }
        }