diff --git a/src/c/ticTacToe.c b/src/c/ticTacToe.c index 3f7c43f..b08dc32 100644 --- a/src/c/ticTacToe.c +++ b/src/c/ticTacToe.c @@ -10,5 +10,17 @@ int something(int a){ } void printPrompt(){ - printf("Let's play Tic Tac Toe. You will use O, I will use X.\nJust enter the number of the field you choose.\nYou start.\n"); + printf("Let's play Tic Tac Toe. You will use O, I will use X.\nJust enter the number of the field you choose as row col.\nYou start.\n"); +} + +void printField(char field[3][3]){ + for (int i = 0; i < 3; i++){ + for (int j = 0; j < 3; j++){ + printf("%d", field[i][j]); + if (j < 2) { + printf("|"); + } + } + printf("\n"); + } } \ No newline at end of file diff --git a/src/c/ticTacToe.h b/src/c/ticTacToe.h index 7c268b6..a01e4e4 100644 --- a/src/c/ticTacToe.h +++ b/src/c/ticTacToe.h @@ -3,5 +3,6 @@ int something(int a); void printPrompt(); +void printField(char field[3][3]); #endif \ No newline at end of file