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

On apprend a utiliser c++

parent 76d299ef
Branches
No related tags found
No related merge requests found
......@@ -4,13 +4,15 @@
#include <iostream>
#include <filesystem>
#include "fullligneexception.h"
#include <QString>
using namespace std;
namespace fs = std::filesystem;
#include "nowordexception.h"
#include "brain.h"
Brain::Brain(string dicodir) : dicodir(dicodir) {
Brain::Brain(string dicodir) : dicodir(dicodir), nbEssais(0) {
vector<string> files = getTxtFiles();
// TODO
// Initialise le menu déroulant avec files
......
......@@ -46,7 +46,7 @@ void Jeu::initGame() {
void Jeu::startGame() {
brain->setFichierDico("words_alpha.txt");
brain->setNombreEssais(6);
brain->setNombreEssais(8);
brain->setTailleMots(5);
brain->initGame();
......
......@@ -16,7 +16,7 @@ void Ligne::initLigne() {
bool Ligne::isGameCleared() {
int nbjustes = 0;
cout << bonmot << endl;
cout << bonmot.length() <<endl;
show();
for (int i = 0; i < bonmot.length(); i++) {
char bonnelettre = toupper(bonmot[i]); // Convert to uppercase
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment