Modification des 3 pour la variable constante LARGTIC
This commit is contained in:
@@ -89,8 +89,8 @@ void afficherImageMenu(std::fstream& monFlux) {
|
|||||||
|
|
||||||
//G<>n<EFBFBD>ral (plusieurs options)
|
//G<>n<EFBFBD>ral (plusieurs options)
|
||||||
void initGrid(string grid[][LARGTIC]) {
|
void initGrid(string grid[][LARGTIC]) {
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < LARGTIC; i++) {
|
||||||
for (int j = 0; j < 3; j++) {
|
for (int j = 0; j < LARGTIC; j++) {
|
||||||
grid[i][j] = "";
|
grid[i][j] = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -277,7 +277,7 @@ void tourJoueur(string grid[][LARGTIC], int joueur) {
|
|||||||
cout << "\n\nEntrez une coordonnee verticale : ";
|
cout << "\n\nEntrez une coordonnee verticale : ";
|
||||||
cin >> verticale;
|
cin >> verticale;
|
||||||
|
|
||||||
while (verticale < 1 || verticale > 3) {
|
while (verticale < 1 || verticale > LARGTIC) {
|
||||||
cout << "\n\nVeuillez entrer une donnee valide.\n"
|
cout << "\n\nVeuillez entrer une donnee valide.\n"
|
||||||
<< "\n\nEntrez une coordonnee verticale : ";
|
<< "\n\nEntrez une coordonnee verticale : ";
|
||||||
cin >> verticale;
|
cin >> verticale;
|
||||||
@@ -286,7 +286,7 @@ void tourJoueur(string grid[][LARGTIC], int joueur) {
|
|||||||
cout << "\nEntrez une coordonnee horizontale : ";
|
cout << "\nEntrez une coordonnee horizontale : ";
|
||||||
cin >> horizontale;
|
cin >> horizontale;
|
||||||
|
|
||||||
while (horizontale < 1 || horizontale > 3) {
|
while (horizontale < 1 || horizontale > LARGTIC) {
|
||||||
cout << "\n\nVeuillez entrer une donnee valide.\n"
|
cout << "\n\nVeuillez entrer une donnee valide.\n"
|
||||||
<< "\n\nEntrez une coordonnee horizontale : ";
|
<< "\n\nEntrez une coordonnee horizontale : ";
|
||||||
cin >> horizontale;
|
cin >> horizontale;
|
||||||
@@ -345,8 +345,8 @@ void tourOrdi(string grid[][LARGTIC]) {
|
|||||||
|
|
||||||
cout << "\n\nTour de l'ordinateur" << endl;
|
cout << "\n\nTour de l'ordinateur" << endl;
|
||||||
do {
|
do {
|
||||||
vertical = rand() % (3);
|
vertical = rand() % (LARGTIC);
|
||||||
horizontal = rand() % (3);
|
horizontal = rand() % (LARGTIC);
|
||||||
} while (grid[vertical][horizontal] != "");
|
} while (grid[vertical][horizontal] != "");
|
||||||
|
|
||||||
grid[vertical][horizontal] = iconJ2;
|
grid[vertical][horizontal] = iconJ2;
|
||||||
|
|||||||
Reference in New Issue
Block a user