Adding cards back into deck
I should be able to figure this out, but I'm completely lost.
The following code deals to a hand of choice a set number of cards (int toDeal):
private void deal(Hand hand, int toDeal)
for (int j = 0; j < toDeal; j++)
Hand temp = hand.handCards();
Card s = new Card[temp.getNumCards() + 1];
Card q = hand.getHand();
for (int k = 0; k < temp.getNumCards(); k++)
s[k] = q[k];
s[s.length - 1] = deck.dealCard();
to call it I run:
How do I make a method to add these cards back into the deck (the cards from the temp array)?
any ideas or code greatly appreciated
Re: Adding cards back into deck
Your question is not clear to me , if it is possible can you make it more clear.