Skip to content
Snippets Groups Projects
Commit 1eacbc89 authored by Massies Alexandre's avatar Massies Alexandre
Browse files

animation fonctionnelle

parent 1c7034b2
No related merge requests found
...@@ -60,10 +60,10 @@ Window { ...@@ -60,10 +60,10 @@ Window {
if (indice_case === nb_lettres) { if (indice_case === nb_lettres) {
var mot_entre = ""; var mot_entre = "";
for (var i = 0; i<nb_lettres; i++){ for (var i = 0; i<nb_lettres; i++){
mot_entre += caseArray[current_essai * nb_lettres + indice_case]; mot_entre += caseArray[current_essai * nb_lettres + indice_case]._textText;
} }
if (motusGame.existWord(mot_entre)){ if (motusGame.existWord(mot_entre.toUpperCase())){
// Vérification de la proposition sur la ligne actuelle // Vérification de la proposition sur la ligne actuelle
for (i = 0; i < nb_lettres; i++) { for (i = 0; i < nb_lettres; i++) {
var case_verif = caseArray[current_essai * nb_lettres + i]; var case_verif = caseArray[current_essai * nb_lettres + i];
...@@ -112,8 +112,9 @@ Window { ...@@ -112,8 +112,9 @@ Window {
repeat: false // Ne se répète pas repeat: false // Ne se répète pas
onTriggered: { onTriggered: {
// Réinitialiser la couleur // Réinitialiser la couleur
for (i = 0; i < nb_lettres; i++) { console.log('coucou');
case_verif = caseArray[current_essai * nb_lettres + i]; for (var ind = 0; ind < nb_lettres; ind++) {
var case_verif = caseArray[current_essai * nb_lettres + ind];
case_verif.rectangleColor = "#323232"; case_verif.rectangleColor = "#323232";
case_verif.rectangleBordercolor = "#ffffff"; case_verif.rectangleBordercolor = "#ffffff";
} }
......
...@@ -76,7 +76,7 @@ bool MotusGame::existWord(const QString &word) { ...@@ -76,7 +76,7 @@ bool MotusGame::existWord(const QString &word) {
// Supposons que wordsByLength est un QMap<int, QStringList> // Supposons que wordsByLength est un QMap<int, QStringList>
const QStringList &list = wordsByLength[n]; const QStringList &list = wordsByLength[n];
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
if (list[i] == word) { if (list[i].toUpper() == word) {
exists = true; exists = true;
break; // On arrête la recherche dès qu'on trouve le mot break; // On arrête la recherche dès qu'on trouve le mot
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment