32 lines
518 B
C
32 lines
518 B
C
#include <stdio.h>
|
|
|
|
char cPlayfield[3][3] = {
|
|
{' ', ' ', ' '},
|
|
{' ', ' ', ' '},
|
|
{' ', ' ', ' '}};
|
|
|
|
char *ptrPlayfield;
|
|
|
|
void renderPlayfield();
|
|
|
|
int main()
|
|
{
|
|
renderPlayfield();
|
|
return 0;
|
|
}
|
|
|
|
void renderPlayfield() {
|
|
printf(" | 1 | 2 | 3 |\n");
|
|
printf("---------------\n");
|
|
for (int i = 0; i < 3; i++)
|
|
{
|
|
printf("%d | ", i+1);
|
|
for (int j = 0; j < 3; j++)
|
|
{
|
|
ptrPlayfield = &cPlayfield[i][j];
|
|
printf("%c | ", *ptrPlayfield);
|
|
}
|
|
printf("\n---------------\n");
|
|
}
|
|
|
|
} |