This commit is contained in:
Sunny
2025-11-26 20:02:38 -05:00
parent bb6d8afaba
commit fcd05842ed

View File

@@ -90,15 +90,15 @@ void afficherImageTableau(std::string grid[][LARGTIC], std::string style) {
SetConsoleOutputCP(CP_UTF8); SetConsoleOutputCP(CP_UTF8);
string emoteUp, string emoteUp,
emoteDown, emoteDown,
emoteJ1, iconJ1,
emoteJ2; iconJ2;
// Faire une fonction pour retenir le th<74>me s<>lectionn<6E> par le joueur!!!! // Faire une fonction pour retenir le th<74>me s<>lectionn<6E> par le joueur!!!!
ouvrirFichier(monFlux, style); ouvrirFichier(monFlux, style);
if (monFlux) { if (monFlux) {
while (!monFlux.eof()) { while (!monFlux.eof()) {
monFlux >> emoteUp >> emoteDown >> emoteJ1 >> emoteJ2; monFlux >> emoteUp >> emoteDown >> ICONJ1 >> ICONJ2;
} }
monFlux.close(); monFlux.close();
cout << endl; cout << endl;
@@ -109,9 +109,10 @@ void afficherImageTableau(std::string grid[][LARGTIC], std::string style) {
} }
fermerFichier(monFlux); fermerFichier(monFlux);
// Lignes de code pour faire afficher le Tic Tac Toe une fois que les symboles ont <20>t<EFBFBD> ajout<75>s grid[0][0] = ICONJ1;
cout << "Joueur 1: " << emoteJ1 << " Joueur 2: " << emoteJ2 << endl << endl; grid[0][1] = ICONJ2;
// Lignes de code pour faire afficher le Tic Tac Toe une fois que les symboles ont <20>t<EFBFBD> ajout<75>s
cout << " "; cout << " ";
for (int i = 0; i < LARGTIC; i++) { for (int i = 0; i < LARGTIC; i++) {
cout << " " << i + 1 << " "; cout << " " << i + 1 << " ";
@@ -131,32 +132,21 @@ void afficherImageTableau(std::string grid[][LARGTIC], std::string style) {
for (int j = 0; j < 3; j++) { for (int j = 0; j < 3; j++) {
cout << " "; cout << " ";
} }
cout << " ";
} }
cout << "|" << endl << " " << k + 1 << " "; cout << "|" << endl << " " << k + 1 << " ";
for (int i = 0; i < LARGTIC; i++) { for (int i = 0; i < LARGTIC; i++) {
cout << "|" << " " ; cout << "|" << " " << grid[k][i] << " ";
if (grid[k][i] == "X") {
cout << emoteJ1;
} }
else if (grid[k][i] == "O") { cout << " |" << endl << " ";
cout << emoteJ2;
}
else {
cout << " ";
}
cout << " ";
}
cout << "|" << endl << " ";
for (int i = 0; i < LARGTIC; i++) { for (int i = 0; i < LARGTIC; i++) {
cout << "|"; cout << "|";
for (int j = 0; j < 3; j++) { for (int j = 0; j < 3; j++) {
cout << " "; cout << " ";
} }
cout << " ";
} }
cout << "|" << endl << " "; cout << "|" << endl << " ";
@@ -206,9 +196,6 @@ void tourJoueur(string grid[][LARGTIC], int joueur) {
cin >> verticale; cin >> verticale;
cout << "\nEntrez une coordonnee horizontale : "; cout << "\nEntrez une coordonnee horizontale : ";
cin >> horizontale; cin >> horizontale;
verticale--;
horizontale--;
} }
if (joueur == 1) { if (joueur == 1) {
@@ -356,7 +343,7 @@ void jeuDeuxJoueurs(string grid[][LARGTIC]) {
} }
//Changer le th<74>me //Changer le th<74>me
void changerLeTheme(bool &theme) { void changerLeTheme() {
string grid[LARGTIC][LARGTIC]; string grid[LARGTIC][LARGTIC];
system("cls"); system("cls");
do { do {
@@ -368,9 +355,6 @@ void changerLeTheme(bool &theme) {
choix = toupper(_getche()); choix = toupper(_getche());
cout << endl; cout << endl;
if (choix >= 'A' && choix <= 'D') {
theme = true;
}
switch (choix) { switch (choix) {
case 'A': case 'A':
style = "themes/themeSea.txt"; style = "themes/themeSea.txt";