Example #1
0
        public void Discard(Card card, Player skipped, Player source)
        {
            Debug.WriteLine("Discarding skip...");
            ExceptionHelpers.CheckNotNull(card, "card");
            ExceptionHelpers.CheckNotNull(skipped, "skipped");
            ExceptionHelpers.CheckNotNull(source, "source");
            ExceptionHelpers.CheckCurrentPlayer(source, this.currentPlayer);

            if (card.Number != CardNumber.Skip)
            {
                throw new ArgumentException("Card is not a skip card!");
            }

            this.discard.AddTopCard(card);
            skipped.SkippedBy(source);

            this.OnPutDiscard(source, card);
            this.OnSkipped(skipped, source);
        }