Dominion.PlayerState.DrawOneCard C# (CSharp) Method

DrawOneCard() private method

private DrawOneCard ( GameState gameState ) : Dominion.Card
gameState GameState
return Dominion.Card
        private Card DrawOneCard(GameState gameState)
        {
            if (this.deck.IsEmpty && !this.discard.IsEmpty)
            {
                TriggerShuffleOfDiscardIntoDeck(gameState);
            }

            if (this.deck.IsEmpty)
                return null;

            if (this.shuffleLuck != null)
            {
                if (this.shuffleLuck.MoveNext())
                {
                    Card preferredCard = this.shuffleLuck.Current;
                    Card result = this.deck.FindAndRemoveCardOrderDestroyed(preferredCard);
                    if (result != null)
                        return result;
                }
                else
                {
                    this.shuffleLuck = null;
                }
            }

            Card card = this.deck.DrawCardFromTop();
            return card;
        }
PlayerState