Dominion.PlayerState.LetPlayerChooseToArrangeStash C# (CSharp) Method

LetPlayerChooseToArrangeStash() private method

private LetPlayerChooseToArrangeStash ( GameState gameState ) : void
gameState GameState
return void
        private void LetPlayerChooseToArrangeStash(GameState gameState)
        {
            int countStashInDeck = this.deck.CountOf(Cards.Stash);
            if (countStashInDeck > 0)
            {
                for (int i = 0; i < countStashInDeck; ++i)
                {
                    Card stashCard = this.deck.FindAndRemoveCardOrderDestroyed(Cards.Stash);
                    if (stashCard == null)
                        throw new Exception("Expected to find stash");
                }

                this.deck.AddNCardsToTop(Cards.Stash, countStashInDeck);
                int[] placements = CardTypes.Stash.GetStashPlacementBeginningOfDeck(countStashInDeck);
                this.actions.ChooseLocationForStashAfterShuffle(gameState, placements);
                CardTypes.Stash.VerifyStashPlacementInDeck(placements, countStashInDeck);
                for (int i = 0; i < countStashInDeck; ++i)
                {
                    this.deck.SwapCardsInPlace(i, placements[i]);
                }
                gameState.gameLog.PlayerChoseLocationForStash(this, placements);
            }
        }
PlayerState