Dominion.PlayerState.RequestPlayerGiveCardToPassLeft C# (CSharp) Method

RequestPlayerGiveCardToPassLeft() private method

private RequestPlayerGiveCardToPassLeft ( GameState gameState ) : Dominion.Card
gameState GameState
return Dominion.Card
        internal Card RequestPlayerGiveCardToPassLeft(GameState gameState)
        {
            if (this.hand.IsEmpty)
            {
                return null;
            }

            Card cardTypeToPassLeft = this.actions.GetCardFromHandToPassLeft(gameState);
            if (cardTypeToPassLeft == null)
            {
                throw new Exception("Player must choose a card to paass");
            }

            Card cardToTopDeck = this.hand.RemoveCard(cardTypeToPassLeft);
            if (cardToTopDeck == null)
            {
                throw new Exception("Could not remove Card From Hand");
            }

            return cardToTopDeck;
        }
PlayerState