public void GainCardFromSupply(Card typeToGain, IActionScope turnScope) { Card gainedCard = turnScope.Supply.AcquireCard(typeToGain, turnScope); turnScope.Publish(new PlayerGainedCardEvent(gainedCard, turnScope)); DiscardPile.Discard(gainedCard, turnScope); }
public void ShuffleDiscardPileIntoDeck(IActionScope turnScope) { DiscardPile.Into(Deck, turnScope); Deck = Deck.Shuffle(); turnScope.Publish(new DeckReplenishedEvent(turnScope)); }
public Card RevealCardFromTopOfDeck(IActionScope turnScope) { var card = Deck.Draw(turnScope); if (card != null) { turnScope.Publish(new PlayerRevealedCardEvent(turnScope, card)); } return(card); }
protected override void OnCardAdded(Card card, IActionScope turnScope) { turnScope.Publish(new CardDrawnEvent(card, turnScope)); }
public void Discard(Card card, IActionScope turnScope) { this.Add(card, turnScope); turnScope.Publish(new DiscardedEvent(card, turnScope)); }