Dominion.GameState.GetSpecialPile C# (CSharp) Method

GetSpecialPile() private method

private GetSpecialPile ( Type cardType ) : PileOfCards
cardType System.Type
return PileOfCards
        internal PileOfCards GetSpecialPile(Type cardType)
        {
            if (cardType.Equals(typeof(CardTypes.BlackMarket)))
            {
                return this.blackMarketDeck;
            }
            else
            {
                throw new Exception("Card type does not have a special pile");
            }
        }

Usage Example

Beispiel #1
0
 public override void DoSpecializedAction(PlayerState currentPlayer, GameState gameState)
 {
     gameState.DoPlayTreasures(currentPlayer);
     PileOfCards pile = gameState.GetSpecialPile(typeof(BlackMarket));
     throw new NotImplementedException();
 }