Merge branch 'main' of https://gitea.zkd.ca/Dev_Web/TicTacToe
This commit is contained in:
@@ -87,7 +87,11 @@ void afficherImageMenu(std::fstream& monFlux) {
|
|||||||
|
|
||||||
//G<>n<EFBFBD>ral (plusieurs options)
|
//G<>n<EFBFBD>ral (plusieurs options)
|
||||||
void initTab(string grid[][LARGTIC]) {
|
void initTab(string grid[][LARGTIC]) {
|
||||||
|
for (int i = 0; i < LARGTIC; i++) {
|
||||||
|
for (int j = 0; j < LARGTIC; i++) {
|
||||||
|
grid[i][j] = " ";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void afficherImageTableau(std::string grid[][LARGTIC]) {
|
void afficherImageTableau(std::string grid[][LARGTIC]) {
|
||||||
@@ -268,10 +272,12 @@ void jeuUnJoueur(string grid[][LARGTIC]) {
|
|||||||
tourJoueur(grid, 1);
|
tourJoueur(grid, 1);
|
||||||
gagnant = 1;
|
gagnant = 1;
|
||||||
fin = verifFinMatch(grid);
|
fin = verifFinMatch(grid);
|
||||||
tourOrdi(grid);
|
if (fin != true) {
|
||||||
gagnant = 2;
|
tourOrdi(grid);
|
||||||
system("PAUSE>0");
|
gagnant = 2;
|
||||||
fin = verifFinMatch(grid);
|
system("PAUSE>0");
|
||||||
|
fin = verifFinMatch(grid);
|
||||||
|
}
|
||||||
} while (fin != true);
|
} while (fin != true);
|
||||||
afficherFinMatch(grid, gagnant, nbJoueurs);
|
afficherFinMatch(grid, gagnant, nbJoueurs);
|
||||||
}
|
}
|
||||||
@@ -295,7 +301,7 @@ void jeuDeuxJoueurs(string grid[][LARGTIC]) {
|
|||||||
int gagnant;
|
int gagnant;
|
||||||
int nbJoueurs = 2;
|
int nbJoueurs = 2;
|
||||||
|
|
||||||
cout << endl << "Deux joueurs a ete choisi. Les tours seront l'un a la suite de l'autre." << endl << endl;
|
cout << "\nDeux joueurs a ete choisi. Les tours seront l'un a la suite de l'autre.\n\n";
|
||||||
|
|
||||||
do {
|
do {
|
||||||
tourJoueur(grid, 1);
|
tourJoueur(grid, 1);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ int main() {
|
|||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
|
|
||||||
char choix;
|
char choix;
|
||||||
string grid[LARGTIC][LARGTIC] = { " ", " ", " "," ", " ", " ", " ", " ", " " };
|
string grid[LARGTIC][LARGTIC] = {" ", " ", " "," ", " ", " ", " ", " ", " "};
|
||||||
|
|
||||||
do {
|
do {
|
||||||
initTab(grid);
|
initTab(grid);
|
||||||
|
|||||||
Reference in New Issue
Block a user