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

plus de bug ?

parent 272040a2
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,7 @@ Window { ...@@ -38,6 +38,7 @@ Window {
y: 624 y: 624
mouseArea.onClicked: { mouseArea.onClicked: {
pageLoader.source = "GameWindow.qml"; pageLoader.source = "GameWindow.qml";
jeu.startGame(); jeu.startGame();
} }
} }
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
#include <iostream> #include <iostream>
#include <filesystem> #include <filesystem>
#include "fullligneexception.h" #include "fullligneexception.h"
#include <QString>
using namespace std; using namespace std;
namespace fs = std::filesystem; namespace fs = std::filesystem;
...@@ -94,7 +92,7 @@ void Brain::trouveMot() { ...@@ -94,7 +92,7 @@ void Brain::trouveMot() {
mot = listeMots.at(randomindex); mot = listeMots.at(randomindex);
} }
void Brain::setFichierDico(string fichierDico) {dico = "./"+fichierDico;} void Brain::setFichierDico(string fichierDico) {dico = fichierDico;}
void Brain::setNombreEssais(int nbEssais) {mNbEssaisMax = nbEssais;} void Brain::setNombreEssais(int nbEssais) {mNbEssaisMax = nbEssais;}
void Brain::setTailleMots(int tailleMot) {mTailleMot = tailleMot;} void Brain::setTailleMots(int tailleMot) {mTailleMot = tailleMot;}
string Brain::getMot() {return mot;} string Brain::getMot() {return mot;}
...@@ -107,9 +105,6 @@ void Brain::initGame() { ...@@ -107,9 +105,6 @@ void Brain::initGame() {
lignes.push_back(new Ligne(getMot())); lignes.push_back(new Ligne(getMot()));
lignes[i]->initLigne(); lignes[i]->initLigne();
} }
// Convertir std::string (getMot()) en QString
QString motQString = QString::fromStdString(getMot()); // Conversion de std::string en QString
} catch (NoWordException e) { } catch (NoWordException e) {
cout << e.what() << endl; cout << e.what() << endl;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Jeu::Jeu(QObject *parent) : QObject(parent) { Jeu::Jeu(QObject *parent) : QObject(parent) {
brain = new Brain("./");
} }
// void Jeu::setMot(const QString& mot) { // void Jeu::setMot(const QString& mot) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment