Skip to content
Snippets Groups Projects
Commit 543cb40b authored by Yanis Dziki's avatar Yanis Dziki
Browse files

clean

parent c6b6b7a6
No related branches found
No related tags found
No related merge requests found
......@@ -50,10 +50,10 @@ vector<string> Brain::getTxtFiles() {
vector<string> txtFiles;
try {
// Iterate through the folder
for (const auto& entry : fs::directory_iterator(dicodir)) {
if (entry.is_regular_file() && entry.path().extension() == ".txt") {
txtFiles.push_back(entry.path().string()); // Add the file path to the vector
txtFiles.push_back(entry.path().string());
}
}
} catch (const exception& e) {
......
......@@ -21,19 +21,19 @@ public:
Q_INVOKABLE int getWidth();
Q_INVOKABLE int getHeight();
Q_INVOKABLE void startGame(); // pour init depuis QML
QQuickItem* getGameWindow() const { return gameWindow; } // Getter for gameWindow
QQuickItem* getGameWindow() const { return gameWindow; } // Getter pour gameWindow
void setLetterModel(LetterModel* model); // Setter pour le modèle
signals:
void motChanged();
void gameWindowChanged(); // Signal to notify when the game window is set
void gameWindowChanged();
private:
Brain* brain;
QQmlApplicationEngine* engine;
QString mot;
QQuickItem* gameWindow; // Pointer to the QQuickItem of the GameWindow
QQuickItem* gameWindow;
LetterModel* m_letterModel = nullptr; // Modèle QML
int currentIndex = 0; // Pour suivre où on écrit
int width;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment