3 Replies - 5606 Views - Last Post: 02 September 2010 - 01:30 PM Rate Topic: ***** 1 Votes

#1 Shadow Crystal  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 14-August 10

Trading Card Game in Java

Posted 02 September 2010 - 11:02 AM

Hii guys.. I wanted some ideas on how to create an online TCG like Yu-Gi-Oh or MtG.. :D

I am unable to decide how to make it..
Like there be a Card Search + Deck Builder and it will work on images..
And then a playing table/zone where Creatures or Shields/Traps(inverted cards)will be put...

So shall I make the Card Seach an array or what?
And make the zones of the playing table and cards objects??.. :dozingoff:

Is This A Good Question/Topic? 0
  • +

Replies To: Trading Card Game in Java

#2 Guest_Guest*


Reputation:

Re: Trading Card Game in Java

Posted 02 September 2010 - 11:48 AM

All off that would depend on the way you decide to set the game up. But, off the top of my head.

Classes:

Player - keeps track of health and cards in hand.
Deck - Holds all the cards that a persons deck has.
Card - the abilities for each card - you might want to make this class implement comparable
(It might be better just to make all the possible cards and just allow at the beginning of the game
players can select which cards they want and save their deck.)
Gui - entire interface for game
Card - holds picture of card with image on it
Hand - holds a layout for all of the players cards
Field - holds the cards out on the field
Background - the entire board that isn't being used
Interface - holds the UI for the program
Was This Post Helpful? 0

#3 Shadow Crystal  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 14-August 10

Re: Trading Card Game in Java

Posted 02 September 2010 - 01:09 PM

Ah! Thanks for that.. Now I am pretty much clear how to create the game. But I am still confused with one thing i.e. how to make a card search and a deck maker.. :|

Any idea?
Was This Post Helpful? 0
  • +
  • -

#4 Guest_Guest*


Reputation:

Re: Trading Card Game in Java

Posted 02 September 2010 - 01:30 PM

I card search should actually be pretty simple, the user's cards would have to put in some type of data type List would probably be sufficient. Then just go through the list from beginning to end until you find the card, if you do have your method return true, else false.

A deck maker would be pretty straightforward, You are going to have to create all your cards all the user needs to do is select the cards they want. At the beginning of the game have the user choose their cards, (set each as a JButton and make it's action listener update the user's deck array.)

To be honest I think if you need this much help designing this, perhaps it is out of range for your coding skills.
Was This Post Helpful? 1

Page 1 of 1