diff --git a/TicTacToe/fonctions.cpp b/TicTacToe/fonctions.cpp index 3ac18a6..e0523e8 100644 --- a/TicTacToe/fonctions.cpp +++ b/TicTacToe/fonctions.cpp @@ -17,6 +17,7 @@ using namespace std; extern const int LARGTIC; string iconJ1 = "X"; string iconJ2 = "O"; +int gagnant; string style = "themes/themeDefaut.txt"; int codeConsole = 0; @@ -182,7 +183,6 @@ void afficherImageTableau(std::string grid[][LARGTIC], std::string style) { SetConsoleOutputCP(codeConsole); } - bool verifFinMatch(std::string grid[][LARGTIC]) { bool fin = false; int max = LARGTIC * LARGTIC; @@ -190,7 +190,6 @@ bool verifFinMatch(std::string grid[][LARGTIC]) { if (compteur == max) { return true; } - else { compteur++; // Valide horizontales diff --git a/TicTacToe/fonctions.h b/TicTacToe/fonctions.h index b89ad28..a6fb097 100644 --- a/TicTacToe/fonctions.h +++ b/TicTacToe/fonctions.h @@ -24,7 +24,7 @@ void afficherImageMenu(std::fstream& monFlux); //Général void afficherImageTableau(std::string grid[][LARGTIC], std::string style); void tourJoueur(std::string grid[][LARGTIC], int joueur); //pour savoir quel icon utiliser -bool verifFinMatch(std::string grid[][LARGTIC]); +bool verifFinMatch(std::string grid[][LARGTIC], int gagnant); void afficherFinMatch(std::string grid[][LARGTIC], int gagnant, int nbJoueurs); //1 joueur