Another assignment I have is to build a Memory game.
http://www.egr115.com/prog05_memory.pdf
…and the code I am given to work with is…
#include “stdio.h”
#include “stdlib.h”
#include “memory.h”
int main()
{
int grid[5][6];
int matched[5][6];
int i=0, j=0;
// Generate the grid
Generate(grid);
// Generate the matched grid
for (i=0; i<5; i++)
{
for (j=0; j<6; j++)
{
if (i==0 || j==0 || i==j)
{
matched*[j] = 0;
} // end of if
else
{
matched*[j] = 1;
} // end of else
} // end of for j
} // end of for i
// Display the grid
Display(grid, matched);
system("pause");
} // end of main()
This is an example of what it is suppose to look like.