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)
|
||||
void initGrid(string grid[][LARGTIC]) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 3; j++) {
|
||||
for (int i = 0; i < LARGTIC; i++) {
|
||||
for (int j = 0; j < LARGTIC; j++) {
|
||||
grid[i][j] = "";
|
||||
}
|
||||
}
|
||||
@@ -277,7 +277,7 @@ void tourJoueur(string grid[][LARGTIC], int joueur) {
|
||||
cout << "\n\nEntrez une coordonnee verticale : ";
|
||||
cin >> verticale;
|
||||
|
||||
while (verticale < 1 || verticale > 3) {
|
||||
while (verticale < 1 || verticale > LARGTIC) {
|
||||
cout << "\n\nVeuillez entrer une donnee valide.\n"
|
||||
<< "\n\nEntrez une coordonnee verticale : ";
|
||||
cin >> verticale;
|
||||
@@ -286,7 +286,7 @@ void tourJoueur(string grid[][LARGTIC], int joueur) {
|
||||
cout << "\nEntrez une coordonnee horizontale : ";
|
||||
cin >> horizontale;
|
||||
|
||||
while (horizontale < 1 || horizontale > 3) {
|
||||
while (horizontale < 1 || horizontale > LARGTIC) {
|
||||
cout << "\n\nVeuillez entrer une donnee valide.\n"
|
||||
<< "\n\nEntrez une coordonnee horizontale : ";
|
||||
cin >> horizontale;
|
||||
@@ -345,8 +345,8 @@ void tourOrdi(string grid[][LARGTIC]) {
|
||||
|
||||
cout << "\n\nTour de l'ordinateur" << endl;
|
||||
do {
|
||||
vertical = rand() % (3);
|
||||
horizontal = rand() % (3);
|
||||
vertical = rand() % (LARGTIC);
|
||||
horizontal = rand() % (LARGTIC);
|
||||
} while (grid[vertical][horizontal] != "");
|
||||
|
||||
grid[vertical][horizontal] = iconJ2;
|
||||
|
||||
Reference in New Issue
Block a user