Reply
Old 06-09-2014, 06:06 AM   #1 (permalink)
 
Status: Senior Member
Posts: 109



Default java memory game code help

I've been pulling my hair out trying to get this to work! Everything works fine, except when the JFrame pops up, only numbers show up and not the images. I'm trying to create a memory game where you have a grid of "cards", and you have to flip up one card and then try and find its match. I don't know how to make the contents of the gamelist equal to the file contents, if that makes any sense.

Here's some of my code, I can always add more if anyone is confused. PLEASE help, thank you soo so much!


private ArrayList<Integer> gameList = new ArrayList<Integer>();
public String files[] = {"robbstark.gif", "housestark.gif", "jorahmormont.gif", "housemormont.gif",
"oberynmartell.gif", "housemartell.gif" , "housetargaryen.gif", "daenerystargaryen.gif", "margaerytyrell.gif", "housetyrell.gif",
"cerseilannister.gif", "houselannister.gif", "renlybaratheon.gif", "housebaratheon.gif", "theongreyjoy.gif","housegreyjoy.gif"};
private JButton[] gameBtn = new JButton[16];
private int counter = 0;
private int[] btnID = new int[2];
private int[] btnValue = new int[2];

Alexis is offline   Reply With Quote
Old 06-09-2014, 06:06 AM   #2 (permalink)
 
Status: Senior Member
Posts: 719



Default java memory game code help

java memory game code help. java memory game code help
Money07 is offline   Reply With Quote
more..

Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the block editors code on mit inventor for the simon memory game app? ImMe Coding 0 11-05-2013 03:07 AM
Java Memory Game help? TimTheConservative Coding 0 04-04-2013 02:06 PM
xcode, creating a memory game,source code? NataliaFoster Coding 0 02-02-2013 03:05 AM
I'm about to buy a code for the full game of crysis 2 the question is how much memory would it use up? Unknown_User Coding 1 04-05-2012 11:36 AM
need source code for a memory game using J creator imm gonna use it as an basis to make games in Jcreator pls sweetflowcrazy Coding 0 09-20-2011 10:06 AM