DERNIER COMMIT DE LA JOURNÉE

This commit is contained in:
Lea
2025-11-26 11:22:17 -05:00
parent 406e5d5196
commit 5597f5248d
4 changed files with 15 additions and 28 deletions

View File

@@ -1 +1 @@
Appuyez sur une touche pour continuer... Appuyez sur une touche pour continuer...

View File

@@ -49,11 +49,11 @@ void afficherMenu(char& choix) {
fermerFichier(monFlux); fermerFichier(monFlux);
// Menu // Menu
cout << endl << "MENU" << endl << "----------------------------------" << endl cout << endl << "MENU" << endl
<< "----------------------------------" << endl
<< "A) 1 joueur" << endl << "A) 1 joueur" << endl
<< "B) 2 joueurs" << endl << "B) 2 joueurs" << endl
<< "C) Montrer l'historique des scores" << endl << "C) Changer le style du jeu" << endl
<< "D) Changer le style du jeu" << endl
<< "Q) Quitter" << endl << endl << "Q) Quitter" << endl << endl
<< "Quel est votre choix? "; << "Quel est votre choix? ";
choix = toupper(_getche()); choix = toupper(_getche());
@@ -86,13 +86,6 @@ void afficherImageMenu(std::fstream& monFlux) {
} }
//G<>n<EFBFBD>ral (plusieurs options) //G<>n<EFBFBD>ral (plusieurs options)
void initTab(string grid[][LARGTIC]) {
for (int i = 0; i < LARGTIC; i++) {
for (int j = 0; j < LARGTIC; j++) {
grid[i][j] = " ";
}
}
}
void afficherImageTableau(std::string grid[][LARGTIC], std::string style) { void afficherImageTableau(std::string grid[][LARGTIC], std::string style) {
SetConsoleOutputCP(CP_UTF8); SetConsoleOutputCP(CP_UTF8);
@@ -106,7 +99,7 @@ void afficherImageTableau(std::string grid[][LARGTIC], std::string style) {
ouvrirFichier(monFlux, style); ouvrirFichier(monFlux, style);
if (monFlux) { if (monFlux) {
while (!monFlux.eof()) { while (!monFlux.eof()) {
monFlux >> emoteUp >> emoteDown >> iconJ1 >> iconJ2; monFlux >> emoteUp >> emoteDown >> ICONJ1 >> ICONJ2;
} }
monFlux.close(); monFlux.close();
cout << endl; cout << endl;
@@ -117,6 +110,9 @@ void afficherImageTableau(std::string grid[][LARGTIC], std::string style) {
} }
fermerFichier(monFlux); fermerFichier(monFlux);
grid[0][0] = ICONJ1;
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 // 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++) {
@@ -133,27 +129,27 @@ void afficherImageTableau(std::string grid[][LARGTIC], std::string style) {
cout << endl << " "; 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 << " |" << endl << " " << k + 1 << " "; cout << "|" << endl << " " << k + 1 << " ";
for (int i = 0; i < LARGTIC; i++) { for (int i = 0; i < LARGTIC; i++) {
cout << " |" << " " << grid[k][i] << " "; cout << "|" << " " << grid[k][i] << " ";
} }
cout << " |" << endl << " "; 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 << " |" << endl << " "; cout << "|" << endl << " ";
} }
@@ -346,14 +342,9 @@ void jeuDeuxJoueurs(string grid[][LARGTIC]) {
afficherFinMatch(grid, gagnant, nbJoueurs); afficherFinMatch(grid, gagnant, nbJoueurs);
} }
//Historique
void historiqueDesScores() {
}
//Changer le th<74>me //Changer le th<74>me
void changerLeTheme() { void changerLeTheme() {
string grid[LARGTIC][LARGTIC] = {ICONJ1, ICONJ2}; string grid[LARGTIC][LARGTIC];
system("cls"); system("cls");
do { do {
cout << endl << "Changer le theme du jeu Tic Tac Toe" << endl cout << endl << "Changer le theme du jeu Tic Tac Toe" << endl

View File

@@ -20,7 +20,6 @@ int main() {
string grid[LARGTIC][LARGTIC]; string grid[LARGTIC][LARGTIC];
do { do {
initTab(grid);
afficherMenu(choix); afficherMenu(choix);
switch (choix) { switch (choix) {
@@ -35,10 +34,6 @@ int main() {
break; break;
case 'C': case 'C':
historiqueDesScores();
break;
case 'D':
changerLeTheme(); changerLeTheme();
break; break;

View File

@@ -2,3 +2,4 @@
🔹 🔹
✖️ ✖️