Compare commits
3 Commits
406e5d5196
...
0f58e20f0d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f58e20f0d | ||
|
|
45707bbab1 | ||
|
|
57ceb7a7c6 |
@@ -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,14 +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);
|
||||||
string emoteUp,
|
string emoteUp,
|
||||||
@@ -346,11 +338,6 @@ 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] = {ICONJ1, ICONJ2};
|
||||||
|
|||||||
@@ -34,8 +34,5 @@ void tourOrdi(std::string grid[][LARGTIC]);
|
|||||||
//2 joueurs
|
//2 joueurs
|
||||||
void jeuDeuxJoueurs(std::string grid[][LARGTIC]);
|
void jeuDeuxJoueurs(std::string grid[][LARGTIC]);
|
||||||
|
|
||||||
//Historique
|
|
||||||
void historiqueDesScores();
|
|
||||||
|
|
||||||
//Changer le th<74>me
|
//Changer le th<74>me
|
||||||
void changerLeTheme();
|
void changerLeTheme();
|
||||||
@@ -16,30 +16,37 @@ const string ICONJ2 = "O";
|
|||||||
int main() {
|
int main() {
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
|
|
||||||
|
bool theme = false;
|
||||||
char choix;
|
char choix;
|
||||||
string grid[LARGTIC][LARGTIC];
|
string grid[LARGTIC][LARGTIC];
|
||||||
|
|
||||||
do {
|
do {
|
||||||
initTab(grid);
|
|
||||||
afficherMenu(choix);
|
afficherMenu(choix);
|
||||||
|
|
||||||
switch (choix) {
|
switch (choix) {
|
||||||
case 'A':
|
case 'A':
|
||||||
|
if (theme == true) {
|
||||||
system("cls");
|
system("cls");
|
||||||
jeuUnJoueur(grid);
|
jeuUnJoueur(grid);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cout << "\n\nVeuillez choisir un theme d'abord.";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'B':
|
case 'B':
|
||||||
|
if (theme == true) {
|
||||||
system("cls");
|
system("cls");
|
||||||
jeuDeuxJoueurs(grid);
|
jeuDeuxJoueurs(grid);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cout << "\n\nVeuillez choisir un theme d'abord.";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'C':
|
case 'C':
|
||||||
historiqueDesScores();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'D':
|
|
||||||
changerLeTheme();
|
changerLeTheme();
|
||||||
|
theme = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Q':
|
case 'Q':
|
||||||
|
|||||||
Reference in New Issue
Block a user