first render of the playfield. cant wait to show that off to Chris
This commit is contained in:
32
TicTacToe.c
Normal file
32
TicTacToe.c
Normal file
@@ -0,0 +1,32 @@
|
||||
#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");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user