Dominion.PlayerState.MoveRevealedCardToDiscard C# (CSharp) Method

MoveRevealedCardToDiscard() private method

private MoveRevealedCardToDiscard ( Dominion.Card typeOfCard, GameState gameState ) : void
typeOfCard Dominion.Card
gameState GameState
return void
        internal void MoveRevealedCardToDiscard(Card typeOfCard, GameState gameState)
        {
            Card card = this.cardsBeingRevealed.RemoveCard(typeOfCard);
            if (card == null)
            {
                throw new Exception("Revealed cards did not have the specified card");
            }

            this.DiscardCard(card, gameState, DeckPlacement.Revealed);
        }

Usage Example

コード例 #1
0
ファイル: Promo.cs プロジェクト: NathanTeeuwen/Dominulator
 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();
 }
All Usage Examples Of Dominion.PlayerState::MoveRevealedCardToDiscard
PlayerState