Don't take my
word for much as I've only been learning
Java for a day or two, but maybe this would work?
Perhaps you could use two ArrayLists? One to hold the true deck and one to hold the shoe. If you make them integers your returns would be easier to handle I think.
import java.util*
public class BlackJack
{
private static int[] hearts = {1, 2, 3, ....};
// repeat for the other suits
private ArrayList<Integer> Deck = new ArrayList<Integer>();
private ArrayList<Integer> Shoe = new ArrayList<Integer>();
private void makeMyDeck()
// code I'm not really sure on here to populate the Deck with the four arrays and their indexes?
private void shuffleDeck()
{
// Do stuff here to populate Shoe randomly from Deck
}
public int dealTheCards()
{
// Code here to spit out the 0 index of Shoe to a Dealer object and a Player object, removing each element as it spits them out.
}
public int hitMe()
{
// Code here to spit out the 0 index of Shoe to the calling object, then remove that element.
}
public string getName()
{
// Code here to get the string name of the index value of each card, like "Ace", "two" and so on.
public void playGame()
{
// Put the game loop here
}
}
You can reference getName() to print out the text value of the cards, and keep the other returns integers to do all the math for the game loop.
Anyway, just my thoughts. Again, I'm still learning and very much new so there is probably a better way. Hope it helped a little, and hopefully someone who knows a lot more can give better details and/or a better way.
Nathan