modification de la vérification de la fin de match avec un compteur

This commit is contained in:
Lea
2025-12-05 08:30:54 -05:00
parent 1d28babc6e
commit 763aba1a13

View File

@@ -185,7 +185,14 @@ void afficherImageTableau(std::string grid[][LARGTIC], std::string style) {
bool verifFinMatch(std::string grid[][LARGTIC]) {
bool fin = false;
int max = LARGTIC * LARGTIC;
int compteur = 0;
if (compteur == max) {
return true;
}
else {
compteur++;
// Valide horizontales
for (int i = 0; i < 2; i++) {
fin = true;
@@ -242,12 +249,11 @@ bool verifFinMatch(std::string grid[][LARGTIC]) {
}
}
if (fin == true) {
return fin;
}
}
}
void afficherFinMatch(string grid[][LARGTIC], int gagnant, int nbJoueurs) {
afficherImageTableau(grid, style);