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

private SetWinner ( Player winner ) : void
winner Player
Результат void
Пример #1
0
        internal void Add(Player player, Card card)
        {
            _cardToPlayerMap.Add(card, player);
            _currentHand.Add(card);

            _playedCards.Add(card);
            _remainingCards.Remove(card);

            CheckForBelotCombination(player, card);

            if (_currentHand.Count < 4)              // current hand is open
            {
                _isHandClosed = false;
            }
            else             // current hand is closed
            {
                _currentHand.SetWinner(DetermineCurrentHandWinner());
                _playedHands.Add(_currentHand);
                _currentHand  = new Hand();
                _isHandClosed = true;
            }
        }