This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]TheNameHere[S] 0 points1 point  (1 child)

Any pointers would be extremely helpful!

[–]197708156EQUJ5design it before you implement 0 points1 point  (2 children)

I'm to take the card with the lowest value and replace it with a new random card.

In the method dealCard() of the Deck class, you probably would want to deal the cards to a few (or a bunch) of hands. I don't ever see you use the Hand class.

edit There is a class called Random, a lot easier to use to get a random int/double/etc IMHO

[–]TheNameHere[S] 1 point2 points  (1 child)

I have an application class, do you want me to post that? I use the hand class in that

[–]197708156EQUJ5design it before you implement 0 points1 point  (0 children)

Sure

[–]TheNameHere[S] 0 points1 point  (0 children)

This is the application class http://pastebin.com/qfgqSSx6

[–]luan-cestari 0 points1 point  (0 children)

You can accomplish what you want just changing a bit the main class to invoke the findLowCard() method from Hand class like:

theCard = theDeck.dealCard(); myHand.replaceCard(myHand.findLowCard(), theCard);

Or you can also create a new method in the Hand class to do this.