TrashCardFromTopOfDeck() private method

private TrashCardFromTopOfDeck ( GameState gameState ) : Dominion.Card
gameState GameState
return Dominion.Card
Beispiel #1
0
 public override void DoSpecializedAttack(PlayerState currentPlayer, PlayerState otherPlayer, GameState gameState)
 {
     // Each other player trashes the top card of his deck ...
     Card trashedCard = otherPlayer.TrashCardFromTopOfDeck(gameState);
     if (trashedCard != null)
     {
         // ... and gains a card with the same cost that you choose
         currentPlayer.RequestPlayerGainCardFromSupply(
             gameState,
             otherPlayer,
             acceptableCard => acceptableCard.CurrentCoinCost(currentPlayer) == trashedCard.CurrentCoinCost(currentPlayer) && acceptableCard.potionCost == trashedCard.potionCost,
             "Card costing equal trashed card");
     }
 }