示例#1
0
        public void GainCardFromSupply(Card typeToGain, IActionScope turnScope)
        {
            Card gainedCard = turnScope.Supply.AcquireCard(typeToGain, turnScope);

            turnScope.Publish(new PlayerGainedCardEvent(gainedCard, turnScope));
            DiscardPile.Discard(gainedCard, turnScope);
        }
示例#2
0
        public void ShuffleDiscardPileIntoDeck(IActionScope turnScope)
        {
            DiscardPile.Into(Deck, turnScope);
            Deck = Deck.Shuffle();

            turnScope.Publish(new DeckReplenishedEvent(turnScope));
        }
示例#3
0
        public Card RevealCardFromTopOfDeck(IActionScope turnScope)
        {
            var card = Deck.Draw(turnScope);

            if (card != null)
            {
                turnScope.Publish(new PlayerRevealedCardEvent(turnScope, card));
            }
            return(card);
        }
示例#4
0
 protected override void OnCardAdded(Card card, IActionScope turnScope)
 {
     turnScope.Publish(new CardDrawnEvent(card, turnScope));
 }
示例#5
0
 public void Discard(Card card, IActionScope turnScope)
 {
     this.Add(card, turnScope);
     turnScope.Publish(new DiscardedEvent(card, turnScope));
 }