diff --git a/motus/brain.cpp b/motus/brain.cpp index 8d6b5b63fb660a2bd8faaba4e22a0785280128c7..b59f3443c31ad94625851beb411e3bc5f64b11f1 100644 --- a/motus/brain.cpp +++ b/motus/brain.cpp @@ -122,7 +122,7 @@ void Brain::trouveMot() { } void Brain::setFichierDico(string fichierDico) {dico = fichierDico;} -void Brain::setNombreEssais(int nbEssais) {mNbEssaisMax = nbEssais;} +void Brain::setNombreEssais(int thenbEssais) {mNbEssaisMax = thenbEssais;} void Brain::setTailleMots(int tailleMot) {mTailleMot = tailleMot;} string Brain::getMot() {return mot;} diff --git a/motus/jeu.cpp b/motus/jeu.cpp index 4a14519679700696a5cbe20ea24a51c016c0038a..6b423d7b1f2c2dcc997b544007e4e07add735e6e 100644 --- a/motus/jeu.cpp +++ b/motus/jeu.cpp @@ -4,7 +4,7 @@ #include <QQmlContext> -Jeu::Jeu(QQmlApplicationEngine* engine, int widht, int height, QObject *parent) : QObject(parent), width(width), height(height), engine(engine) { +Jeu::Jeu(QQmlApplicationEngine* engine, int width, int height, QObject *parent) : QObject(parent), width(width), height(height), engine(engine) { brain = new Brain("./"); } @@ -36,19 +36,6 @@ void Jeu::onClavierClick(QString lettre) { int etat = etats[index] - '0'; // convertit '0', '1', '2' → 0, 1, 2 m_letterModel->setStates(index, etat); } - - - // string lagrille = brain->getGrid(); - // for (int index = 0; index < 40; index ++) { - // string nomCell = "cell_"+to_string(index/8)+"_"+to_string(index%8); - // QObject *cell = rootObject->findChild<QObject*>(nomCell); - // if (cell) { - // cell->setProperty("color", "red"); - // } - // } - - - } diff --git a/motus/main.cpp b/motus/main.cpp index 1efe6a2cfba7c6cbed133489f6b649d0cdeb3a08..2f612284d57323e28023251136b8b0c3a07bf319 100644 --- a/motus/main.cpp +++ b/motus/main.cpp @@ -13,8 +13,8 @@ int main(int argc, char *argv[]) { qmlRegisterType<VraieCase>("motus", 1, 0, "VraieCase"); - int width = 10; - int height = 8; + int width = 7; + int height = 6; // Charger l'interface utilisateur (QML) LetterModel letterModel(width, height);