Exemplo n.º 1
0
        private void MoveLastCard(IUniqueCardPile fromPile, IUniqueCardPile toPile)
        {
            var moveCard = fromPile.Peek();

            toPile.Push(moveCard);
            fromPile.Remove(moveCard);
        }
Exemplo n.º 2
0
        public void Push(Card item)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }

            if (item.Suit != Suit)
            {
                throw new IncompatibleCardSuitException(Suit, item.Suit);
            }

            _wrappedCardPile.Push(item);
        }