Dominion.PlayerState.RequestPlayerNameACard C# (CSharp) Method

RequestPlayerNameACard() private method

private RequestPlayerNameACard ( GameState gameState ) : Dominion.Card
gameState GameState
return Dominion.Card
        internal Card RequestPlayerNameACard(GameState gameState)
        {
            Card cardType = this.actions.NameACard(gameState);
            if (cardType == null)
            {
                throw new Exception("Must name a card");
            }

            gameState.gameLog.PlayerNamedCard(this, cardType);
            return cardType;
        }

Usage Example

Beispiel #1
0
        public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
        {
            Card cardType = currentPlayer.RequestPlayerNameACard(gameState);
            currentPlayer.RevealCardsFromDeck(3, gameState);

            while (currentPlayer.cardsBeingRevealed.HasCard(cardType))
            {
                currentPlayer.MoveRevealedCardToTrash(cardType, gameState);
            }

            currentPlayer.RequestPlayerPutRevealedCardsBackOnDeck(gameState);
        }
All Usage Examples Of Dominion.PlayerState::RequestPlayerNameACard
PlayerState