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 EndGameCleanup(Game game) { var scope = game.StartTurn(this); Hand.Discard(DiscardPile, scope); DiscardPile.Into(Deck, scope); }
public void ShuffleDiscardPileIntoDeck(IActionScope turnScope) { DiscardPile.Into(Deck, turnScope); Deck = Deck.Shuffle(); turnScope.Publish(new DeckReplenishedEvent(turnScope)); }
public void Discard(Card card, DiscardPile discardPile, IActionScope scope) { if (this.Contains(card)) { InnerList.Remove(card); discardPile.Discard(card, scope); } }
private void ReshuffleDrawDeck() { if (DiscardPile.Count > 0) { DrawDeck.AddRange(DiscardPile.Shuffle()); DiscardPile.Clear(); } }
public void moveCardFromGlobalPilesToPlayerDiscardPile(string cardName) { if (!gameBoard.globalCardsPiles.getCardsPile(cardName).isEmpty()) { addCardToPlayerDiscardPile(gameBoard.globalCardsPiles.getCardsPile(cardName).drawCard()); DiscardPile.Peek().CardOwner = cardsPilesOwner; } }
public Player(Deck deck, DiscardPile discardPile, IPlayerController strategy, PlayerId id = null, string name = "Player") { _controller = strategy; Name = name; if (deck == null) { throw new ArgumentNullException("Must pass non-null instance of Deck"); } Hand = new Hand(); DiscardPile = discardPile; Deck = deck.Shuffle(); }
public void Discard(DiscardPile discardPile, IActionScope turnScope) { InnerList.ToList().ForEach(c => Discard(c, discardPile, turnScope)); }
public void DiscardCardsInHand() { DiscardPile.AddRange(Hand); Hand.Clear(); }
private void DiscardCardsInPlay() { DiscardPile.AddRange(InPlay); InPlay.Clear(); }
public void PlaceCardsInDiscardPile(CardSet cards) { DiscardPile.AddRange(cards); }