From 75829c5225a44ba6261a1494ddb248d0e2f5d791 Mon Sep 17 00:00:00 2001 From: Ulysse Durand <ulysse.durand@ens-lyon.fr> Date: Fri, 11 Apr 2025 22:36:24 +0200 Subject: [PATCH] =?UTF-8?q?re=C3=A7amarche?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- motus/brain.cpp | 2 +- motus/jeu.cpp | 15 +-------------- motus/main.cpp | 4 ++-- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/motus/brain.cpp b/motus/brain.cpp index 8d6b5b6..b59f344 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 4a14519..6b423d7 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 1efe6a2..2f61228 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); -- GitLab