This commit is contained in:
Sunny
2025-12-05 09:51:51 -05:00
parent 00217eb38a
commit a72da69ea7

View File

@@ -186,11 +186,11 @@ void afficherImageTableau(std::string grid[][LARGTIC], std::string style) {
bool verifFinMatch(std::string grid[][LARGTIC], int compteur) {
bool fin = false;
int max = LARGTIC * LARGTIC;
if (compteur == max) {
return true;
}
else {
compteur++;
// Valide horizontales 00, 01, 02 || 10, 11, 12 || 20, 21, 22
for (int i = 0; i < LARGTIC; i++) {
fin = true;
@@ -396,7 +396,7 @@ void jeuDeuxJoueurs(string grid[][LARGTIC]) {
gagnant = 1;
fin = verifFinMatch(grid, compteur);
compteur++;
gagnant = partieNulle(grid, compteur);
if (fin != true) {
tourJoueur(grid, 2);
gagnant = 2;
@@ -404,6 +404,7 @@ void jeuDeuxJoueurs(string grid[][LARGTIC]) {
compteur++;
}
} while (fin != true);
gagnant = partieNulle(grid, compteur);
afficherFinMatch(grid, gagnant, nbJoueurs);
}