Click here to Skip to main content
14,665,418 members
Rate this:
Please Sign up or sign in to vote.
See more:

I want to create a memory game in opengl , so I create some square (3*3)

by two for like this:

for (float i = 0; i < 3 ; i++)
		for (float j = 0; j < 3 ; j++)
			squre1();// create a cell

I want to change color of some squares randomly ,after 2 seconds those cells change to before color,and user should remember witch cell is changed and click on it ...

So I want each square selective and know witch cell is clicked.
The simple solution is use array for manage my work but how do it?
and what another solution ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100