commentaire important
This commit is contained in:
@@ -95,6 +95,7 @@ string choisirMot(string nomFichier, int maximum) {//Choisi un mot al
|
||||
fermerFichier(monFlux);
|
||||
return motRandom;
|
||||
}
|
||||
|
||||
string goToLine(fstream& monFlux, int numeroLigne) {//g<>n<EFBFBD>re un nb al<61>atoire, et choisi une ligne associ<63> pour un mot al<61>atoire. renvoi le mot choisi
|
||||
string mot;
|
||||
for (int i = 0; i < numeroLigne; i++) {
|
||||
@@ -103,11 +104,14 @@ string goToLine(fstream& monFlux, int numeroLigne) {//g
|
||||
return mot;
|
||||
}
|
||||
|
||||
void afficherMenuJouer()
|
||||
void effectuerTour()
|
||||
{
|
||||
string motRandom = choisirMot("Mots/mot3lettres.txt", 15);
|
||||
|
||||
cout << setw(83) << "=============================================\n";
|
||||
|
||||
string motPlayer;
|
||||
|
||||
for (int nbTentative = 0; nbTentative < 6; nbTentative++)
|
||||
{
|
||||
do
|
||||
@@ -115,11 +119,15 @@ void afficherMenuJouer()
|
||||
cout << setw(65) << "Tentative #" << nbTentative + 1 << endl;
|
||||
cout << setw(69) << "Saisir votre mot : ";
|
||||
cin >> motPlayer;
|
||||
} while (motPlayer.length() > 3);
|
||||
} while (motPlayer.length() == 3);
|
||||
|
||||
if (dansListe(motPlayer))
|
||||
{
|
||||
cout << "\na continue\n";
|
||||
cout << "\nto continue\n";
|
||||
//NE PAS EFFACER
|
||||
//if (motRandom[0] == motPlayer[0])
|
||||
//else if (motRandom[0] == motPlayer[1] || motPlayer[2])
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -145,11 +153,13 @@ bool dansListe(string motPlayer)
|
||||
|
||||
if (motPlayer == mot)
|
||||
{
|
||||
fermerFichier(monFlux);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
fermerFichier(monFlux);
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user