diff --git a/src/main/c/GameTic_Tac_Toe/game.c b/src/main/c/GameTic_Tac_Toe/game.c index 7d5c061..aeec7e0 100644 --- a/src/main/c/GameTic_Tac_Toe/game.c +++ b/src/main/c/GameTic_Tac_Toe/game.c @@ -4,3 +4,16 @@ char board[3][3] = {{'1', '2', '3'}, {'4', '5', '6'}, {'7', '8', '9'}}; char currentPlayer = 'X'; + +// Funktionen zur Anzeige des Spielbretts +void displayBoard() { + printf("Tic-Tac-Toe\n"); + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 3; j++) { + printf("%c", board[i][j]); + if (j < 2) printf(" | "); + } + printf("\n"); + if (i < 2) printf("---------\n"); + } +}