This commit is contained in:
Sunny
2025-11-28 09:18:25 -05:00
2 changed files with 24 additions and 16 deletions

View File

@@ -1 +1 @@
Press any key to continue . . . Appuyez sur une touche pour continuer...

View File

@@ -368,13 +368,14 @@ void jeuDeuxJoueurs(string grid[][LARGTIC]) {
void changerLeTheme(bool& theme) { void changerLeTheme(bool& theme) {
string grid[LARGTIC][LARGTIC]; string grid[LARGTIC][LARGTIC];
system("cls"); system("cls");
cout << endl << "Changer le theme du jeu Tic Tac Toe" << endl;
do { do {
cout << endl << "Changer le theme du jeu Tic Tac Toe" << endl cout << endl
<< "Options des styles: " << "\n-------------------------------------" << "Options des styles: " << "\n\n-------------------------------------"
<< "\nA) Ocean" << "\nA) Par defaut"
<< "\nB) Fantaisie" << "\nC) Espace" << "\nB) Fantaisie" << "\nC) Espace"
<< "\nD) Animaux" << "\nE) Defaut" << "\nQ) Revenir en arriere" << "\nD) Animaux" << "\nE) Ocean" << "\nQ) Revenir en arriere"
<< "\nChoisir une option: "; << "\n\nChoisir une option: ";
choix = toupper(_getche()); choix = toupper(_getche());
cout << endl; cout << endl;
@@ -383,19 +384,20 @@ void changerLeTheme(bool& theme) {
} }
switch (choix) { switch (choix) {
case 'A': case 'A':
style = "themes/themeSea.txt"; style = "themes/themeDefaut.txt";
afficherImageTableau(grid, style); afficherImageTableau(grid, style);
cout << "\n\nVoulez vous utiliser ce theme? "; cout << "\n\nVoulez vous utiliser ce theme? ";
choix = toupper(_getche()); choix = toupper(_getche());
if (choix == 'O') { if (choix == 'O') {
style = "themes/themeSea.txt"; style = "themes/themeDefaut.txt";
cout << "\nTheme choisi. \n";
} }
else { else {
style = "themes/themeDefaut.txt"; style = "themes/themeDefaut.txt";
cout << "Le theme par defaut sera choisi."; cout << "\nLe theme par defaut sera quand meme choisi.";
} }
break; break;
@@ -409,11 +411,12 @@ void changerLeTheme(bool& theme) {
if (choix == 'O') { if (choix == 'O') {
style = "themes/themeFantasy.txt"; style = "themes/themeFantasy.txt";
cout << "\nTheme choisi. \n";
} }
else { else {
style = "themes/themeDefaut.txt"; style = "themes/themeDefaut.txt";
cout << "Le theme par defaut sera choisi."; cout << "\nLe theme par defaut sera choisi.";
} }
break; break;
@@ -426,11 +429,12 @@ void changerLeTheme(bool& theme) {
if (choix == 'O') { if (choix == 'O') {
style = "themes/themeEspace.txt"; style = "themes/themeEspace.txt";
cout << "\nTheme choisi. \n";
} }
else { else {
style = "themes/themeDefaut.txt"; style = "themes/themeDefaut.txt";
cout << "Le theme par defaut sera choisi."; cout << "\nLe theme par defaut sera choisi.";
} }
break; break;
@@ -443,36 +447,40 @@ void changerLeTheme(bool& theme) {
if (choix == 'O') { if (choix == 'O') {
style = "themes/themeAnimaux.txt"; style = "themes/themeAnimaux.txt";
cout << "\nTheme choisi. \n";
} }
else { else {
style = "themes/themeDefaut.txt"; style = "themes/themeDefaut.txt";
cout << "Le theme par defaut sera choisi."; cout << "\nLe theme par defaut sera choisi.";
} }
break; break;
case 'E': case 'E':
style = "themes/themeDefaut.txt"; style = "themes/themeSea.txt";
afficherImageTableau(grid, style); afficherImageTableau(grid, style);
cout << "\n\nVoulez vous utiliser ce theme? "; cout << "\n\nVoulez vous utiliser ce theme? ";
choix = toupper(_getche()); choix = toupper(_getche());
if (choix == 'O') { if (choix == 'O') {
style = "themes/themeDefaut.txt"; style = "themes/themeSea.txt";
cout << "\nTheme choisi. \n";
} }
else { else {
style = "themes/themeDefaut.txt"; style = "themes/themeDefaut.txt";
cout << "Le theme par defaut sera quand meme choisi."; cout << "\nLe theme par defaut sera choisi.\n";
} }
break; break;
case 'Q': case 'Q':
cout << "\n\nRetour au menu principal";
system("PAUSE>nul");
break; break;
default: default:
cout << "\nChoisir une option valide. \n"; cout << "\n\nChoisir une option valide. \n";
break; break;
} }
} while (choix != 'Q'); } while (choix != 'Q');