diff --git a/src/main/c/GameTic_Tac_Toe/tictactoe.c b/src/main/c/GameTic_Tac_Toe/tictactoe.c index 84a2430..e367101 100644 --- a/src/main/c/GameTic_Tac_Toe/tictactoe.c +++ b/src/main/c/GameTic_Tac_Toe/tictactoe.c @@ -9,9 +9,11 @@ const char PLAYER_X = 'X'; const char PLAYER_O = 'O'; void reset_board(){ - board[3][3] = {{'1', '2', '3'}, - {'4', '5', '6'}, - {'7', '8', '9'}}; + for(int i = 0; i < BOARD_SIZE; i++){ + for(int j = 0; j < BOARD_SIZE; y++){ + board[i][j] = j * BOARD_SIZE + i + 1; + } + } } // Funktionen zur Anzeige des Spielbretts