Beispiel #1
0
        public Card draw(Deck onDeck)
        {
            Card member = onDeck.deal();

            hand.Add(member);
            return(member);
        }
Beispiel #2
0
        public Card draw(Deck rummydeck)
        {
            Card removedcard = rummydeck.deal();

            hand.Add(removedcard);
            return(removedcard);
        }
Beispiel #3
0
        public Card draw(Deck deck)
        {
            Card cardDrawn = deck.deal();

            hand.Add(cardDrawn);
            return(cardDrawn);
        }
Beispiel #4
0
        public void draw(Deck deck)
        {
            Card myCard = deck.deal();

            System.Console.WriteLine($"You got {myCard.stringVal} of {myCard.suit}");
            hand.Add(myCard);
        }
Beispiel #5
0
        public Card draw(Deck deck)
        {
            Card c = deck.deal();

            newDeck.Add(c);
            return(c);
        }
Beispiel #6
0
        public Card draw(Deck D)
        {
            Card NewCard = D.deal();

            hand.Add(NewCard);
            return(NewCard);
        }
Beispiel #7
0
        public Card draw(Deck deck)
        {
            Card card = deck.deal();

            Hand.Add(card);
            return(card);
        }
Beispiel #8
0
        public Card draw(Deck addhand)  //Give the player a draw method this needs to reference the Deck object
        {
            Card newCard = addhand.deal();

            hand.Add(newCard);
            return(newCard);
        }
Beispiel #9
0
        public Card draw(Deck deck) // The player's DRAW method, connects to Deck's DEAL method
        {
            Card playerCard = deck.deal();

            playerHand.Add(playerCard);
            System.Console.WriteLine("Drawing! You got " + playerCard); // HOW TO MAKE THIS SHOW UP IN TERMINAL
            return(playerCard);
        }
Beispiel #10
0
        public Card draw(Deck deck)
        {
            Card card = deck.deal();

            hand.Add(card);
            System.Console.WriteLine("Player drew: " + card.stringVal + " of " + card.suit);
            return(card);
        }
        public Card draw(Deck takeOne)
        {
            Card cardDealed;

            cardDealed = takeOne.deal();
            hand.Add(cardDealed);
            return(cardDealed);
        }
Beispiel #12
0
        public Card draw()
        {
            Card card = deck.deal();

            this.hand.Add(card);

            return(card);
        }
Beispiel #13
0
        public Card draw(Deck addhand)

        {
            Card newCard = addhand.deal();

            hand.Add(newCard);
            return(newCard);
        }
Beispiel #14
0
        static void Main(string[] args)             // This is where we call our functions
        {
            Player chelsea = new Player("Chelsea"); // Enter Chelsea! Yay!
            Deck   myDeck  = new Deck();            // Creates a new deck of cards

            myDeck.shuffle();                       // Shuffle the deck
            chelsea.draw(myDeck);                   // Draw a card from the deck
            chelsea.discard(0);                     // Remove a card from the deck
            myDeck.deal();                          // Deals a card from the deck
            myDeck.reset();                         // Reset the deck of cards
        }
Beispiel #15
0
        static void Main(string[] args)
        {
            Deck myDeck = new Deck();

            Console.WriteLine("Dealing: " + myDeck.deal().ToString());
            myDeck.reset();
            myDeck.shuffle();
            Player ali = new Player("Ali");

            ali.draw();
            ali.draw();
            ali.draw();
            ali.discard(2);
        }
Beispiel #16
0
 // Give the Player a draw method of which draws a card from a deck, adds it to the player's hand and returns the Card. Note this method will require reference to a deck object
 public Card draw(Deck cardDrawn)
 {
     if (IsFull)
     {
         Console.WriteLine("Can't draw any more cards. Their hands card full");
         return(null);
     }
     else
     {
         Card newCards = cardDrawn.deal();
         Hand.Add(newCards);
         return(newCards);
     }
 }
Beispiel #17
0
        static void Main(string[] args)
        {
            Deck deck = new Deck();

            deck.deal();
            deck.reset();
            deck.shuffle();
            deck.show();
            Player p1 = new Player("Bob");

            p1.draw(deck);
            Console.WriteLine(p1.discard(0));
            Console.WriteLine(p1.discard(0));
        }
Beispiel #18
0
        public static void Main(string[] args)
        {
            Deck rummydeck = new Deck();

            Card removedcard = rummydeck.deal();

            rummydeck.shuffle();

            rummydeck.reset();

            Player Don = new Player("Don");

            Card cardret = Don.draw(rummydeck);

            Card cardret2 = Don.draw(rummydeck);

            Card cardret3 = Don.draw(rummydeck);

            Card Discard = Don.discard(5);
        }
Beispiel #19
0
        static void Main(string[] args)
        {
            Deck myDeck = new Deck();

            // myDeck.deal();
            // myDeck.deal();
            // myDeck.deal();
            // myDeck.reset();
            myDeck.shuffle();
            myDeck.deal();
            Player Art = new Player("Art");

            Art.draw(myDeck);
            Art.draw(myDeck);
            Art.draw(myDeck);
            Art.draw(myDeck);
            Art.draw(myDeck);

            Art.showHand();
            Art.discard(0);
            System.Console.WriteLine();
            Art.showHand();
        }
Beispiel #20
0
 public void Draw(Deck deck)
 {
     hand.Add(deck.deal());
 }
 public void draw(Deck deck)
 {
     this.hand.Add(deck.deal());
 }