Update: liste de mots

This commit is contained in:
2025-12-05 11:35:42 -05:00
parent 02d1062f97
commit 150e533402
4 changed files with 8 additions and 5 deletions

View File

@@ -24,6 +24,7 @@ using namespace std::chrono_literals;
#include <limits> //Sources : https://www.tutorialspoint.com/cpp_standard_library/limits.htm et https://stackoverflow.com/questions/2158943/split-string-into-array-of-chars
const int BONNE_PLACE = 1, MAUVAIS_PLACE = 2, PAS_LA = 3;
extern const int NOMBREMOT3LETTRE = 51;
/*====================================
MENU
@@ -111,7 +112,7 @@ void effectuerTour(int nbLettre)
string nomFichier;
HANDLE hconsole = GetStdHandle(STD_OUTPUT_HANDLE);//pour la couleur
string motRandom = choisirMot("Mots/mot3lettres.txt", 15);
string motRandom = choisirMot("Mots/mot3lettres.txt", NOMBREMOT3LETTRE);
cout << setw(83) << "=============================================\n";
@@ -179,7 +180,7 @@ bool dansListe(string motPlayer) {
ouvrirFichier(monFlux, "Mots/mot3lettres.txt");
string mot;
for (int i = 0; i < 15; i++) { //TODO changer le chiffre 15 par le num<75>ro de ligne dans le ficher
for (int i = 0; i < NOMBREMOT3LETTRE; i++) {
getline(monFlux, mot);
if (motPlayer == mot)