well essentially you want to have 9 images that you match up thru a randomly placed board game, correct?
match games have 2 of each, so you need an array of 18.. you want to have the image, the x location and the y location of each peice, so you would make this...
DIM Cards(18,3) AS INTEGER
card 0 is at x,y `first image
card 1 is at x,y `first image
card 2 is at x,y `second image
card 3 is at x,y `second image
card 4 is at x,y `third image
...
if the first card picked is card 0 and the second card picked is card 1 then they match.... etc etc...
this is just one of many ways to do it.
http://ausukusa.breakset.com