FUCKKKK UUUUUUU
This commit is contained in:
@@ -1 +1 @@
|
||||
Press any key to continue . . .
|
||||
Appuyez sur une touche pour continuer...
|
||||
|
||||
@@ -17,6 +17,9 @@ using namespace std;
|
||||
extern const int LARGTIC;
|
||||
string ICONJ1 = "X";
|
||||
string ICONJ2 = "O";
|
||||
string ICONJ1 = "X";
|
||||
string ICONJ2 = "O";
|
||||
string style;
|
||||
int codeConsole = 0;
|
||||
|
||||
fstream monFlux;
|
||||
@@ -96,13 +99,15 @@ void initTab(string grid[][LARGTIC]) {
|
||||
void afficherImageTableau(std::string grid[][LARGTIC], std::string style) {
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
string emoteUp,
|
||||
emoteDown;
|
||||
emoteDown,
|
||||
iconJ1,
|
||||
iconJ2;
|
||||
|
||||
// Faire une fonction pour retenir le th<74>me s<>lectionn<6E> par le joueur!!!!
|
||||
ouvrirFichier(monFlux, style);
|
||||
if (monFlux) {
|
||||
while (!monFlux.eof()) {
|
||||
monFlux >> emoteUp >> emoteDown >> ICONJ1 >> ICONJ2;
|
||||
monFlux >> emoteUp >> emoteDown >> iconJ1 >> iconJ2;
|
||||
}
|
||||
monFlux.close();
|
||||
cout << endl;
|
||||
@@ -167,7 +172,7 @@ void tourJoueur(string grid[][LARGTIC], int joueur) {
|
||||
horizontale;
|
||||
|
||||
cout << "\n\nTour du joueur " << joueur << endl;
|
||||
afficherImageTableau(grid);
|
||||
afficherImageTableau(grid, style);
|
||||
|
||||
cout << "\n\nEntrez une coordonnee verticale : ";
|
||||
cin >> verticale;
|
||||
@@ -254,7 +259,7 @@ bool verifFinMatch(std::string grid[][LARGTIC]) {
|
||||
}
|
||||
|
||||
void afficherFinMatch(string grid[][LARGTIC], int gagnant, int nbJoueurs) {
|
||||
afficherImageTableau(grid);
|
||||
afficherImageTableau(grid, style);
|
||||
|
||||
if (nbJoueurs == 1) {
|
||||
if (gagnant == 1) {
|
||||
@@ -302,7 +307,7 @@ void tourOrdi(string grid[][LARGTIC]) {
|
||||
horizontal = rand() % (3);
|
||||
} while (grid[vertical][horizontal] != " ");
|
||||
grid[vertical][horizontal] = ICONJ2;
|
||||
afficherImageTableau(grid);
|
||||
afficherImageTableau(grid, style);
|
||||
}
|
||||
|
||||
//2 joueurs
|
||||
@@ -331,7 +336,7 @@ void historiqueDesScores() {
|
||||
}
|
||||
|
||||
//Changer le th<74>me
|
||||
void changerLeTheme(std::string &style) {
|
||||
void changerLeTheme() {
|
||||
string grid[LARGTIC][LARGTIC] = {ICONJ1, ICONJ2};
|
||||
system("cls");
|
||||
cout << endl << "Changer le theme du jeu Tic Tac Toe" << endl
|
||||
@@ -342,10 +347,12 @@ void changerLeTheme(std::string &style) {
|
||||
choix = toupper(_getche());
|
||||
cout << endl;
|
||||
|
||||
do {
|
||||
switch (choix) {
|
||||
case 'A':
|
||||
style = "themes/themeSea.txt";
|
||||
afficherImageTableau(grid, style);
|
||||
system("PAUSE");
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
@@ -369,4 +376,5 @@ void changerLeTheme(std::string &style) {
|
||||
default:
|
||||
cout << "\nChoisir une option valide. \n";
|
||||
}
|
||||
} while (choix != 'Q');
|
||||
}
|
||||
@@ -22,7 +22,8 @@ void afficherImageMenu(std::fstream& monFlux);
|
||||
|
||||
//G<>n<EFBFBD>ral
|
||||
void initTab(std::string grid[][LARGTIC]);
|
||||
void afficherImageTableau(std::string grid[][LARGTIC]);
|
||||
void afficherImageTableau(std::string grid[][LARGTIC], std::string style);
|
||||
void changerLeTheme(std::string& style);
|
||||
void tourJoueur(std::string grid[][LARGTIC], int joueur); //pour savoir quel icon utiliser
|
||||
bool verifFinMatch(std::string grid[][LARGTIC]);
|
||||
void afficherFinMatch(std::string grid[][LARGTIC], int gagnant, int nbJoueurs);
|
||||
|
||||
@@ -10,8 +10,8 @@ BUT : Main pour le jeu Tic Tac Toe
|
||||
#include "fonctions.h"
|
||||
using namespace std;
|
||||
|
||||
const string ICONJ1 = { "X" };
|
||||
const string ICONJ2 = { "O" };
|
||||
const string ICONJ1 = "X";
|
||||
const string ICONJ2 = "O";
|
||||
|
||||
int main() {
|
||||
srand(time(NULL));
|
||||
|
||||
Reference in New Issue
Block a user