+ 8
War Card Game
I'm thinking about making the card game war in java. I was thinking about how to represent a deck of cards. Should I have one array with all the cards in it, or should I make two arrays, one with the suit and the other with the number? Any suggestions on this or on how to go about coding it are welcome. ;)
9 Answers
+ 7
www.bestprogramminglanguagefor.me
did you get java?
+ 6
@J.G.
A few links to consider.
Might help you get a clue on the base classes, arrays and structure in general:
http://nifty.stanford.edu/2004/EstellCardGame/code.html#
A full tutorial even for the average:
http://www.dreamincode.net/forums/topic/116864-how-to-make-a-poker-game-in-java/
+ 5
right! my bad! java offers fantastic oop so that shouldn't be a prob. :)
+ 5
I tried it and got python...
+ 4
Ahh... I didn't think of that. It will be interesting to try. Thank you for the suggestion. ;)
+ 4
@Tristan I am not an HTML programmer, which is one of the reasons why everything you say is confusing to me. But I understand that, so okay. It would be better to do it in that instead of in java, but I just wanted to make something a little more difficult and have it record (output) the results.
+ 4
Thanks for all of the help. I'm getting pretty busy right now, so it may be a while before I get back to you.
+ 3
I'd create class "Card" with fields like, "color", "number" and "suit". Then create "Player" class which includes array of Cards objects. Hope it helped ^^
+ 3
That's why I'm learning it (or one of the reasons)