maintenant tout marche, la validation pour la diagonale de 1 3 à 3 1 fonctionne enfin

This commit is contained in:
Lea
2025-12-07 11:46:20 -05:00
parent b488389d8a
commit 632d4b332c

View File

@@ -247,11 +247,12 @@ bool verifFinMatch(std::string grid[][LARGTIC], int compteur) {
// Valide diagonale 02, 11, 20
fin = true;
for (int i = 2; i > 0; i--) {
if (grid[i][i] == "") {
if (grid[i][2-i] == "") {
fin = false;
}
else {
fin = fin && (grid[i][i] == grid[i - 1][i - 1]);
fin = fin && (grid[i][2 - i] == grid[2-i][i]);
cout << "V<EFBFBD>rification de " << i << "," << 2 - i << " et " << 2 - i << "," << i << endl;
}
}
@@ -419,6 +420,7 @@ void changerLeTheme() {
system("cls");
cout << endl << "Changer le theme du jeu Tic Tac Toe" << endl;
do {
system("cls");
cout << endl
<< "Options des styles: " << "\n\n-------------------------------------"
<< "\nA) Par defaut"
@@ -445,7 +447,7 @@ void changerLeTheme() {
style = "themes/themeDefaut.txt";
cout << "\nLe theme par defaut sera quand meme choisi. \n";
}
system("PAUSE>nul");
break;
case 'B':
@@ -464,6 +466,7 @@ void changerLeTheme() {
style = "themes/themeDefaut.txt";
cout << "\nLe theme par defaut sera choisi.\n";
}
system("PAUSE>nul");
break;
case 'C':
@@ -482,6 +485,7 @@ void changerLeTheme() {
style = "themes/themeDefaut.txt";
cout << "\nLe theme par defaut sera choisi.\n";
}
system("PAUSE>nul");
break;
case 'D':
@@ -500,6 +504,7 @@ void changerLeTheme() {
style = "themes/themeDefaut.txt";
cout << "\nLe theme par defaut sera choisi.\n";
}
system("PAUSE>nul");
break;
case 'E':
@@ -518,6 +523,7 @@ void changerLeTheme() {
style = "themes/themeDefaut.txt";
cout << "\nLe theme par defaut sera choisi.\n";
}
system("PAUSE>nul");
break;
case 'Q':
@@ -526,6 +532,7 @@ void changerLeTheme() {
default:
cout << "\n\nChoisir une option valide. \n";
system("PAUSE>nul");
break;
}
} while (choix != 'Q');