diff --git a/TicTacToe/fonctions.cpp b/TicTacToe/fonctions.cpp index fe0ab2b..879baa0 100644 --- a/TicTacToe/fonctions.cpp +++ b/TicTacToe/fonctions.cpp @@ -339,6 +339,7 @@ void tourOrdi(string grid[][LARGTIC]) { vertical = rand() % (3); horizontal = rand() % (3); } while (grid[vertical][horizontal] != ""); + grid[vertical][horizontal] = iconJ2; afficherImageTableau(grid, style); } diff --git a/TicTacToe/main.cpp b/TicTacToe/main.cpp index f167b50..6e7d9e3 100644 --- a/TicTacToe/main.cpp +++ b/TicTacToe/main.cpp @@ -23,28 +23,17 @@ int main() { switch (choix) { case 'A': - if (theme == true) { - system("cls"); - jeuUnJoueur(grid); - } - else { - cout << "\n\nVeuillez choisir un theme d'abord."; - } + system("cls"); + jeuUnJoueur(grid); break; case 'B': - if (theme == true) { - system("cls"); - jeuDeuxJoueurs(grid); - } - else { - cout << "\n\nVeuillez choisir un theme d'abord."; - } + system("cls"); + jeuDeuxJoueurs(grid); break; case 'C': changerLeTheme(theme); - theme = true; break; case 'Q':