Memory Game

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Apr 2006
Posts: 114
Reputation: KimJack is an unknown quantity at this point 
Solved Threads: 0
KimJack KimJack is offline Offline
Junior Poster

Memory Game

 
0
  #1
Oct 1st, 2009
Hello,

I am working on a plain old simple text version of a memory game.
The player will be able to match letters of the alphabet by clicking on various numbers. For example

This is what the player will see:

123
456
789

but underneath that will be something like:

ABF
DFA
BDA

If user enters 1 and 6 they get a matching set and the letters underneath will display, if the user enters 3 and 4 the letters underneath will not display.

I am wondering what is the best way to go about programming a game like this. Should I use an array, 2d array, or arraylist. Any suggestions or examples will be wonderful

Thank you,
Kimjack
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 598
Reputation: anupam_smart is an unknown quantity at this point 
Solved Threads: 4
anupam_smart's Avatar
anupam_smart anupam_smart is offline Offline
Posting Pro

Re: Memory Game

 
0
  #2
Oct 1st, 2009
one 1D array (char type) should do the job... for storing the characters... their indexes will be used in comparing with the value entered by the user. if the character at the indexes (values) enered by the user are same then they will show, otherwise not...
I hope u got my point....
# Never say impossible 'cause impossible itself says:

"I M POSSIBLE":) :) :)

#Your I Can is more important than your I.Q.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 114
Reputation: KimJack is an unknown quantity at this point 
Solved Threads: 0
KimJack KimJack is offline Offline
Junior Poster

Re: Memory Game

 
0
  #3
Oct 1st, 2009
Yes, I think I got it. Thanks
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC