CleanupCardsToDiscard() 개인적인 메소드

private CleanupCardsToDiscard ( GameState gameState ) : void
gameState GameState
리턴 void
예제 #1
0
        private void DoCleanupPhase(PlayerState currentPlayer)
        {
            currentPlayer.playPhase = PlayPhase.Cleanup;

            if (currentPlayer.ownsCardThatHasSpecializedCleanupAtStartOfCleanup)
            {
                currentPlayer.cardsInPlayAtBeginningOfCleanupPhase.CopyFrom(currentPlayer.cardsPlayed);
                foreach (Card cardInPlay in currentPlayer.cardsInPlayAtBeginningOfCleanupPhase)
                {
                    cardInPlay.DoSpecializedCleanupAtStartOfCleanup(currentPlayer, this);
                }
                currentPlayer.cardsInPlayAtBeginningOfCleanupPhase.Clear();
            }

            currentPlayer.CleanupCardsToDiscard(this);
        }
예제 #2
0
        private void DoCleanupPhase(PlayerState currentPlayer)
        {
            currentPlayer.EnterPhase(PlayPhase.Cleanup);

            if (currentPlayer.ownsCardThatHasSpecializedCleanupAtStartOfCleanup)
            {
                currentPlayer.cardsInPlayAtBeginningOfCleanupPhase.CopyFrom(currentPlayer.cardsPlayed);
                foreach (Card cardInPlay in currentPlayer.cardsInPlayAtBeginningOfCleanupPhase)
                {
                    this.cardContextStack.PushCardContext(currentPlayer, cardInPlay, CardContextReason.CardBeingCleanedUp);
                    cardInPlay.DoSpecializedCleanupAtStartOfCleanup(currentPlayer, this);
                    this.cardContextStack.Pop();
                }
                currentPlayer.cardsInPlayAtBeginningOfCleanupPhase.Clear();
            }

            currentPlayer.CleanupCardsToDiscard(this);
        }