modification de la vérification de la fin de match avec un compteur
This commit is contained in:
@@ -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,11 +249,10 @@ bool verifFinMatch(std::string grid[][LARGTIC]) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (fin == true) {
|
||||
return fin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void afficherFinMatch(string grid[][LARGTIC], int gagnant, int nbJoueurs) {
|
||||
|
||||
Reference in New Issue
Block a user