From c928b9483d2f77bccaf546e5f7b3e82d730f52b2 Mon Sep 17 00:00:00 2001 From: Lea Date: Fri, 5 Dec 2025 10:22:44 -0500 Subject: [PATCH] modification de la fonction partie nulle --- TicTacToe/fonctions.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/TicTacToe/fonctions.cpp b/TicTacToe/fonctions.cpp index 74e119f..2ff3f7a 100644 --- a/TicTacToe/fonctions.cpp +++ b/TicTacToe/fonctions.cpp @@ -275,6 +275,18 @@ void afficherFinMatch(string grid[][LARGTIC], int gagnant, int nbJoueurs) { cout << "\n\nPartie nulle!"; } } + + else if (nbJoueurs == 2){ + if (gagnant == 1) { + cout << "\n\nJoueur 1 a gagne la partie!"; + } + else if (gagnant == 2) { + cout << "\n\nJoueur 2 a gagne la partie!"; + } + else { + cout << "\n\nPartie nulle!"; + } + } } int partieNulle(string grid[][LARGTIC], int compteur) { @@ -283,6 +295,7 @@ int partieNulle(string grid[][LARGTIC], int compteur) { gagnant = 3; return gagnant; } + else { gagnant = 1; return gagnant;