Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: imagesToScrollRescale[i] is undefined' in or related to this line: 'if (imagesToScrollRescale[i].isDestroyedOnEnd) {' Line Number: 725
Code edit (1 edits merged)
Please save this source code
Code edit (5 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: backGroundOptionsZone is not defined' in or related to this line: 'game.addChild(backGroundOptionsZone);' Line Number: 351
Code edit (9 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: setScore is not defined' in or related to this line: 'setScore(0);' Line Number: 396
Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: clueWord is not defined' in or related to this line: 'if (clueWord != '') {' Line Number: 601
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: mainGrid.findNclick is not a function' in or related to this line: 'mainGrid.findNclick(firstLetter);' Line Number: 506
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: setClueButtonWord is not defined' in or related to this line: 'setClueButtonWord('ButtonClue1');' Line Number: 380
Code edit (8 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: clueWord is undefined' in or related to this line: 'var letter = clueWord[clueLevel - 1];' Line Number: 487
Code edit (1 edits merged)
Please save this source code
Code edit (12 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: mainGrid.cells[line] is undefined' in or related to this line: 'if (mainGrid.cells[line][col]) {' Line Number: 453
Code edit (1 edits merged)
Please save this source code
Code edit (9 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: word is undefined' in or related to this line: 'var wordShuffled = wordShuffled = word.split('').sort(function () {' Line Number: 495
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: pickAndShakeSingleWord is not defined' in or related to this line: 'var word = pickAndShakeSingleWord().word;' Line Number: 495
Code edit (6 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: maingrid is not defined' in or related to this line: 'if (maingrid) {' Line Number: 547
===================================================================
--- original.js
+++ change.js
@@ -424,8 +424,12 @@
game.addChild(validateButton);
} //Fin de la fonction setValidateButton
//Fonction onClickClueButton : permet de donner un indice au joueur
function onClickClueButton() {
+ if (!wordGrid.isEmpty() && clueLevel == 0) {
+ //Si le joueur a déjà commencé à former un mot, on ne donne pas d'indice
+ return;
+ }
scoreTest = "clueLevel = " + clueLevel;
switch (clueLevel) {
case 0:
//Si il n'y a qu'un seul mot dans la liste principale : on selectionne la première lettre du mot
@@ -459,32 +463,18 @@
mainGrid.colorWordCells(word, "#000000");
}, 3000);
}
break;
- case 1:
- //On prend un mot au hasard dans la liste principale et on clique sur la première lettre (isClicked = true)
- if (mainGrid.words.length > 0) {
- var randomIndex = Math.floor(Math.random() * mainGrid.words.length);
- var word = mainGrid.words[randomIndex];
- clueWord = word; //On garde le mot pour le prochain indice
- var firstLetter = word[0];
- for (var i = 0; i < mainGrid.gridLines; i++) {
- for (var j = 0; j < mainGrid.gridColumns; j++) {
- if (mainGrid.cells[i][j].letter == firstLetter) {
- mainGrid.cells[i][j].onClickCell();
- }
- }
- }
- }
- break;
default:
- //On applique le même indice que le niveau 2 et superieur
- if (clueWord != '') {
+ //On descend les lettres d'un mot
+ if (typeof clueWord !== 'undefined' && clueWord != '') {
var letter = clueWord[clueLevel - 1];
+ var isLetterFound = false;
for (var i = 0; i < mainGrid.gridLines; i++) {
for (var j = 0; j < mainGrid.gridColumns; j++) {
- if (mainGrid.cells[i][j].letter == letter) {
+ if (mainGrid.cells[i][j].letter == letter && !isLetterFound) {
mainGrid.cells[i][j].onClickCell();
+ isLetterFound = true;
}
}
}
}
@@ -640,8 +630,9 @@
}
if (indexCellToRemove >= 0) {
wordGrid.removeCell(indexCellToRemove);
indexCellToRemove = -1;
+ clueLevel = 0; //On remet le niveau d'indice à 0
}
//Autres actions à effectuer sans urgence
if (LK.ticks % 10 == 0) {
//Chargement initiale de la grille principale si nécessaire (vide):
An empty cell.
Drapeau national des USA en fond d'un patchwork des États américains.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Une jeton de scrabble sans lettre.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Un bouton arrondi suggérant une validation mais sans texte écrit dessus.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A round button with a cyan interrogation mark.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A round cyan button with a yellow lamp bulb.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Planetes.
Remove the white square and the red lines.
A patchwork of european countries with the european unio flag in back ground.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A yellow coin wher we can see '+10' written on it.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A red coin wher we can see '-10' written on it... Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Patchwork of heads of plenty animals.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
The periodic table of the elements.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Patchwork de mots sur un fond cyan.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Patchwork of scene extracted from video games.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
It is written "COOL QUIZZ".
A cyan circle button with a home silhouette in the center. The button means "go back to start window". Avoid white color.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.