Ejemplo n.º 1
0
        public Deck DoYouHaveAny(Value value)
        {
            //This is where an opponent asks if I have any cards of a certain value
            //Use Deck.PullOutValues() to pull out the values. Add a line to the TextBox
            //that says, "Joe has 3 sixes" -use the new Card.Plural() static method
            Deck cardcheck = cards.PullOutValues(value);

            if (cardcheck.Count > 1)
            {
                this.textBoxOnForm.Text += this.Name + " has " + cardcheck.Count + " " + Card.Plural(value) + "\r\n";
            }
            else
            {
                this.textBoxOnForm.Text += this.Name + " has " + cardcheck.Count + " " + value + "\r\n";
            }

            return(cardcheck);
        }