Skip to content
Snippets Groups Projects
Commit 75829c52 authored by Ulysse Durand's avatar Ulysse Durand
Browse files

reçamarche

parent 14c752bb
No related branches found
No related tags found
No related merge requests found
......@@ -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;}
......
......@@ -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");
// }
// }
}
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment