Quote (DirtyRasa @ Dec 4 2013 01:59pm)
Cards toString should be going through all of the cards and calling the Card.toString() method in my opinion.
the Card.ToString() method shouuld be printing out 'Ace of Spades'
I usually frown upon just handing out code... but here's my blackjack game I made in college way back when:
https://code.google.com/p/cisc370-finalproject/source/browse/#hggameserversrccardsYou can see my Card class and Deck class. I'm guessing my Deck class will be similar to your Cards...
And you can see my Shoe class for making the Decks to play Blackjack
Please do not just copy paste, look at the code and ask questions. You'll get no where if you just copy/paste.
thank you, taking a look at it right now. Wont copy paste, i'd like to learn this stuff and create my own
my plan as of right now is to do it the long way by setting a new constructor
Code
public Cards(int numbers, int suits)
{
number = numbers;
suit = suits;
}
and several if statements within the toString() method such as
Code
String a = "";
String b = "";
if(number == 1)
{
a += " Ace ";
}
if(suit == 1)
{
b += "Spades";
}
return a + " of " + b;
Should return Ace of Spades. The get suit and Get number methods will just return suit and number respectively instead as well
for each card. Ill implement the random # generator within the actual testerclass in the main method that inputs a random # for the constructor's arguments. hoping itll work, and if i can get that done then i can get to trying to build a better program
tyvm for the help btw guys
This post was edited by pwnage007 on Dec 4 2013 03:24pm