diff --git a/motus/ligne.cpp b/motus/ligne.cpp index 69a9a0ca353e01df9121179f5c5de88dae349dbb..d90e51f8a0d2ccfd81ac4ba61df91caa8b9e54ab 100644 --- a/motus/ligne.cpp +++ b/motus/ligne.cpp @@ -52,9 +52,10 @@ void Ligne::show() { cout << "|" << endl; } -bool Ligne::dansMot(QChar lettre, string mot) { +bool Ligne::dansMot(char lettre, string mot) { + cout << lettre << " " << mot << endl; for (int i=0;i<mot.length();i++) { - if (mot[i] == lettre) { + if (mot[i] == tolower(lettre)) { return true; } } diff --git a/motus/ligne.h b/motus/ligne.h index 0cc9498cd23d0fbccdd1d2f1407932bfaad64b54..8c9216268705aacea5ad3e99662bd818429fa4ae 100644 --- a/motus/ligne.h +++ b/motus/ligne.h @@ -24,13 +24,12 @@ public: void show(); vector<VraieCase*> contenu; string getMot(); + bool dansMot(char lettre, string mot); private: string bonmot; int positionCurseur; int taille; - -static bool dansMot(QChar lettre, std::string mot); }; #endif // LIGNE_H