From a10845eff22867a8ef3f94937a568c76487e52f4 Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 5 Dec 2025 08:40:19 -0500 Subject: [PATCH] =?UTF-8?q?La=20v=C3=A9rif=20verticale=20marche=20toujours?= =?UTF-8?q?=20pas=20et=20jsp=20comment=20faire=20la=20partie=20nulle=20;-;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TicTacToe/fonctions.cpp | 3 +-- TicTacToe/fonctions.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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