Ajout de 2 fonction pour jouer.

This commit is contained in:
William
2025-11-28 09:04:23 -05:00
parent 164cbf70dc
commit 6cc93a7e01

View File

@@ -116,6 +116,27 @@ void afficherMenuJouer() {
cout << setw(66) << "Votre mot est : " << motPlayer;
}
bool dansListe(string motPlayer)
{
fstream monFlux;
ouvrirFichier(monFlux, "Mots/mot3lettres.txt");
comparerMot(monFlux, motPlayer, 15);
}
bool comparerMot(fstream& monFlux, string motPlayer, int numeroLigne)
{
string mot;
for (int i = 0; i < numeroLigne; i++) {
getline(monFlux, mot);
if (motPlayer == mot)
{
return true;
}
}
return false;
}
/*====================================
2 - OPTIONS
====================================*/