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

2
0
View File

@@ -1 +1 @@
Press any key to continue . . .
Appuyez sur une touche pour continuer...

View File

@@ -49,3 +49,4 @@ fin
vie
tri
ris
lis

View File

@@ -27,6 +27,7 @@ int main() {
int temp = 0; //TODO: Variable temporaire
int nbLettre = 3;
string motRandom; // Mot random
const int NOMBREMOT3LETTRE = 51;
while (quitter == false) {
curseur(false);

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)