Dominion.PlayerState.MoveRevealedCardToDiscard C# (CSharp) Метод

MoveRevealedCardToDiscard() приватный Метод

private MoveRevealedCardToDiscard ( Dominion.Card typeOfCard, GameState gameState ) : void
typeOfCard Dominion.Card
gameState GameState
Результат 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
 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