first render of the playfield. cant wait to show that off to Chris

This commit is contained in:
Jannis Heydemann
2026-05-12 12:46:36 +02:00
parent 5bed5d21a6
commit 06f1cc941f
2 changed files with 32 additions and 0 deletions

32
TicTacToe.c Normal file
View 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");
}
}

BIN
main Executable file

Binary file not shown.