diff --git a/TicTacToe/fonctions.cpp b/TicTacToe/fonctions.cpp index dc68f96..16cb0a6 100644 --- a/TicTacToe/fonctions.cpp +++ b/TicTacToe/fonctions.cpp @@ -86,6 +86,14 @@ void afficherImageMenu(std::fstream& monFlux) { } //Général (plusieurs options) +void initGrid(string grid[][LARGTIC]) { + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 3; j++) { + grid[i][j] = ""; + } + } +} + void afficherImageTableau(std::string grid[][LARGTIC], std::string style) { SetConsoleOutputCP(CP_UTF8); string emoteUp, diff --git a/TicTacToe/fonctions.h b/TicTacToe/fonctions.h index 7405153..4ffdd05 100644 --- a/TicTacToe/fonctions.h +++ b/TicTacToe/fonctions.h @@ -17,6 +17,7 @@ void ouvrirFichier(std::fstream& monFlux, std::string nomFichier); void fermerFichier(std::fstream& monFlux); //Menu +void initGrid(std::string grid[][LARGTIC]); void afficherMenu(char& choix); void afficherImageMenu(std::fstream& monFlux); @@ -34,5 +35,4 @@ void tourOrdi(std::string grid[][LARGTIC]); void jeuDeuxJoueurs(std::string grid[][LARGTIC]); //Changer le thème -void changerLeTheme(bool &theme); - +void changerLeTheme(bool& theme); \ No newline at end of file