i dont under stand, if you want to create the card...
have two variables... like so
int S, NP;
public card (int suit, int numPips)
{
S = suit;
NP = numPips;
}
public int getCard()
{
return S + "\t" + NP;
}
or you could have an enumerated type like so
enum FaceCards = {Ace, Jack, Queen, King};
enum NumCards = {One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten};
and you could do like FaceCards.Ace;
but there is something like ace is o, jack is 1.
but i can't remember how to call them.
or you could do like, i think, FaceCards(0);
and instead of having FaceCards and NumCard separate, have one enum value like.
enum
Cards = {Ace, one, two, three, ... , King};
and then have two random int generators for 0 - 12;
and then it would pick two cards randomly and all you would have to do
is say like
do
{
System.out.println("Do you want to play a game of BlackJack?(Y or N)");
String Answer = scan.nextLine();//you have to create a scanner.
if (Answer.equalsIgnoreCase("y");
{
// this is where you would create your two random generators.
// and then print out the following.
System.out.println(Cards.randomNum1);
System.out.println(Cards.randomNum2);
}
}while(!answer.equalsIgnoreCase("N");
now if you want to make the application have a hit me option...
you'll have to do that on your own lol, im tired.
i hope any of this helped..
-Justin-