Would anyone like to help me make a card game in java? It's based off of an already existing card game. It's just for experience so no money will be made.
Also, not sure if this is the right section to be posted in. Please move this thread if I'm wrong
Edit for questions:
Would making a method for each card be the best way? There are 168 cards so it'd take some time but I can't think of another way
Card game in java
Can you specify more detailed requirements for your game? Is it going to have GUI and graphical representation of each card or will it be a console game? What card game will it be based on? Will it contain multiplayer or player vs COM (or both)?
Although i have no skill in java (only a bit in C#) i would definitely like to help you think out your concept. I would really like to hear more about the idea.
Would making a method for each card be the best way? There are 168 cards so it'd take some time but I can't think of another way
No, this would be horrible. It really depends on the specifics of your game, implementation, and coding style, but you would probably end up putting your cards in some sort of structure like a list, or an array, where they would each have an index. You then write a few flexible methods that can act on any given card using its index (or something like that, in Java you'd probably use the card itself instead of its index, as a class), these implement the functionality of your game.
I think if you are unable to think of another way than to duplicate code 168 times - and please don't be offended, we all started somewhere - you should probably try and get your hands dirty with common programming patterns before attempting a full-blown card game, like mini-programs such as "guess the number" or "shift a list of numbers so that every element goes down one notch and the first element goes at the end of the list" (which is actually quite instructive if you've never worked with arrays), or the Java equivalents thereof.
PS: unless each card in your game happens to perform a totally different action, in which case you would of course need that many methods, but I am pretty sure this is not the case and that there is some amount of coherence (like for a solitaire game, all the cards are initially in a deck, and you pick them one by one, clearly this doesn't require more than a single "pick" method that is applicable to all the cards in the deck).
Actually with this game, that is the case unfortunately. Each card does something different besides a few duplicate cards
Well, still, you have to describe the game for us. We can't really help you if you don't give us the idea behind the game.
Actually with this game, that is the case unfortunately. Each card does something different besides a few duplicate cards
Would this then be a traditional card game (with a deck of 52 standard playing cards) or more of a trading card game (like Magic: The Gathering)?
It's based off the card game Munckin. I just wanted to port that game to windows for a little practice before trying my own game
i read a bit about the game and although i think it is quite interesting to make, i feel it might be somewhat difficult. would you be interested in creating a computer AI player? or create a game to play against other humans?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement