コード例 #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
ファイル: Hand.cs プロジェクト: thatpaulschofield/Dominion
 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));
 }