in case you give a look again.
Code:
char shapeX[7][8] = { "-------"
, "|* *|"
, "| * * |"
, "| t |"
, "| * * |"
, "|* *|"
, "-------"
};
char shapeO[5][6] = {
" *** "
, "* *"
, "* *"
, "* *"
, " *** "
};
shapeO[2][2] = numbers[(rand() % 6)];
// print the image
for(int k = 0; k < 5; k++)
{
for(int c = 0; c < 6; c++)
printf("%c", shapeO[k][c]);
printf("\n");
}
shapeX[3][3] = numbers[(rand() % 6)];
for(int k = 0; k < 7; k++)
{
for(int c = 0; c < 8; c++)
printf("%c", shapeX[k][c]);
printf("\n");
}
Code:
$ ./x_and_o_3darray
***
* *
* 3 *
* *
***
-------
|* *|
| * * |
| 2 |
| * * |
|* *|
-------