ArrayList with Objects the right approach?
I am making a memory match game for my java class. I want my game to have a twist that makes it a bit different than the classic memory match game.
My concept is to match by association. For example, i might use country flags that you would have to match to the country names. I would be storing everything as jpg images, even the names.
Where I am running into problems is matching 2 pictures that have different names.
What I planned to implement was an ArrayList of Objects. Each object would store the picture reference and a category. The 2 associated pictures would have the same category, and I could match them using that since the jpg names would be different.
Does this logic sound good? Am I on the right path?
Or should I think about using a different approach?