Java help

Blackjack wouldn't be too hard, that's a pretty good idea. Use arrays for the cards, write the program using methods, and throw in some while or for loops and you have a decent program using a bunch of concepts.
 
Yeah, assuming you've used arrays before this should be very easy. Use dual arrays so you have the card in one part of the array, and a boolean for weather ro not it was delt so you don't get duplicate cards.

Out of curiosity, what compiler are you using?
 
How's the Black Jack game working? I was on the brink of creating a better version of FreeCell today...then I started playing it.

I got a small start on it. What's slowing me down is that I am learning Java while I'm writing the program. I really wish I could just write it in C++ (but my prof says no). I haven't touched the program since Wednesday. I've just been busy with other things.

Blackjack wouldn't be too hard, that's a pretty good idea. Use arrays for the cards, write the program using methods, and throw in some while or for loops and you have a decent program using a bunch of concepts.

Thanks, I'm liking it so far. I'm starting to see a few of the challenges involved but I should hopefully be able to work around them.

Yeah, assuming you've used arrays before this should be very easy. Use dual arrays so you have the card in one part of the array, and a boolean for weather ro not it was delt so you don't get duplicate cards.

Out of curiosity, what compiler are you using?

when you say dual arrays are you speaking of 2-dimensional arrays or 2 separate regular arrays?

I'm using Java JDK 6 as my compiler.
 
you say dual arrays are you speaking of 2-dimensional arrays or 2 separate regular arrays?

I think he means a 2 dimensional array. I hate dealing with those. See if you can make a class and have an single dimensional array that uses a variable defined by that class. I could prove more effective if you need to associate more things with each card.
 
Finally!! I finished my black jack game! LOL for the 3 weeks I had to program it I only managed to find time to work on it for 3-4 days but I got it done today! I have to hand it in tomorrow.

The only problem I wasn't able to fix was that every time the player wins, it says "YOU WIN" indicating a win but it also says "A DRAW" meaning there was a draw at the same time... It doesn't affect anything else but i just can't pinpoint why it's declaring both. (if statements look ok to me so idk...)
 
I'm sure i can track down where the problem is and I probably will but unfortunately not before I submit it. I had too many other things to worry about finishing so i couldn't get around to fixing the problem. It's minor, and the programming portion of this project is only worth 25% of the total mark.
 
Back
Top Bottom