modification de la fonction partie nulle

This commit is contained in:
Lea
2025-12-05 10:22:44 -05:00
parent ffe4af9f93
commit c928b9483d

View File

@@ -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;