MoveRevealedCardToDiscard() private method

private MoveRevealedCardToDiscard ( Dominion.Card typeOfCard, GameState gameState ) : void
typeOfCard Dominion.Card
gameState GameState
return void
示例#1
0
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     currentPlayer.RevealCardsFromDeck(5, gameState);
     Card cardType = gameState.players.PlayerLeft.actions.BanCardToDrawnIntoHandFromRevealedCards(gameState);
     if (!currentPlayer.cardsBeingRevealed.HasCard(cardType))
     {
         throw new Exception("Must ban a card currently being revealed");
     }
     currentPlayer.MoveRevealedCardToDiscard(cardType, gameState);
     currentPlayer.MoveAllRevealedCardsToHand();
 }
示例#2
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            while (true)
            {
                Card revealedCard = currentPlayer.DrawAndRevealOneCardFromDeck(gameState);
                if (revealedCard == null)
                    break;
                if (revealedCard.isTreasure)
                {
                    if (currentPlayer.actions.ShouldTrashCard(gameState, revealedCard))
                    {
                        currentPlayer.MoveRevealedCardToTrash(revealedCard, gameState);
                    }
                    else
                    {
                        currentPlayer.MoveRevealedCardToDiscard(revealedCard, gameState);
                    }
                    break;
                }
            }

            currentPlayer.MoveRevealedCardsToDiscard(gameState);
        }