Here is a rough sketch of what I want to happen with my memory game task:

instruction screen
v click

compound screen with multiples of the same image file
v click on one

screen remains the same except for the sector clicked which turns into a new image
v click another

new click turns into another image, if it matches first image they both remain onscreen.
if second click does not match first image they remain on screen for 500ms then they change back to original.
v click

.....
(matching continues until all cards are flipped and paired)


Problem: I want to randomize the placement of each card in the set and have the computer recognize when a segment of the screen is clicked that it has a matching click somewhere else on the screen that is associated with a successful match.
I want to avoid creating images of each scenario (top left turned over, top left and top middle left turned over, etc ad infinitum)

When I try to set up a simplified version of this task i can't even get all the cards to be on screen, let alone get to the point where I can assign pairs that correlate with each other or even get them to switch images while allowing all the others to stay put.

Any help would be a giant leap forward at this point,
Jesse