Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'var nbWords = mainListsList[i].length;' Line Number: 468
Code edit (19 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'var nbWords = mainListsList[i].length;' Line Number: 468
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'resetGrid')' in or related to this line: 'mainGrid.resetGrid();' Line Number: 592
Code edit (12 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: setHelpButtons is not defined' in or related to this line: 'setHelpButtons('ButtonHelp');' Line Number: 471
Code edit (1 edits merged)
Please save this source code
Code edit (8 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: ticksDelay is not defined' in or related to this line: 'var image = createImageToSrollRescale(asset, xFrom, yFrom, {' Line Number: 924
Code edit (1 edits merged)
Please save this source code
Code edit (16 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: periodic is not defined' in or related to this line: 'var mainListsList = [planetesNsatellites, usaStates, europeanCapitales, animals, periodic]; //Liste des listes de mots principales' Line Number: 349
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: 'Uncaught ReferenceError: oneCell is not defined' in or related to this line: 'nameGrid.width = miniBackGrounds[i].width - 2 * oneCell.cellSize;' Line Number: 455
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: x is not defined' in or related to this line: 'x += width;' Line Number: 451
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -536,26 +536,39 @@
//Fonction onClickHelpButton : permet d'afficher une aide
//Affiche le backGround de l'aide et le texte d'aide avec displayText
function onClickHelpButton() {
setBackGroundImage('BackGroundHelp');
- displayText("Aide", 'cellWord', MainZone.y);
+ displayText("Cliquez sur une lettre \n de la grille principale pour la sélectionner.", 'cellWord', MainZone.y);
game.removeChild(helpButton);
setHomeButton('ButtonHome');
} //Fin de la fonction onClickHelpButton
//Fonction displayText : permet d'afficher un texte en utilisant des NameGrid
//Le texte est affiché dans la zone de jeu et une nouvelle NameGrid est créée pour chaque ligne
function displayText(text, assetName, y) {
+ var nameGridRef = new LettersGrid(1, 1, assetName);
+ var cellWidth = nameGridRef.oneCell.width;
+ var cellHeight = nameGridRef.oneCell.height;
var lines = text.split('\n');
var nbLines = lines.length;
- scoreText = "nbLines: " + nbLines;
- var cell = new GridCell('', 'cell');
- var nameGrid = makeNameGrid(lines[0], assetName);
- nameGrid.y = y;
- nameGrid.width = game.width - 2 * cell.width;
- nameGrid.height = nbLines * cell.height;
- nameGrid.x = 0;
- game.addChild(nameGrid);
-} //Fin de la fonction displayText
+ var maxCellsPerLine = Math.floor(MainZone.width / cellWidth / 2);
+ //scoreTest = "maxCellsPerLine: " + maxCellsPerLine;
+ for (var i = 0; i < nbLines; i++) {
+ //scoreTest = "nbLines: " + nbLines;
+ var nbCellsPerLine = Math.min(maxCellsPerLine, lines[i].length);
+ var partialLines = [];
+ for (var j = 0; j < lines[i].length; j += nbCellsPerLine) {
+ partialLines.push(lines[i].substring(j, j + nbCellsPerLine));
+ }
+ scoreTest += "i:" + i + " / " + partialLines + "\n";
+ for (var j = 0; j < partialLines.length; j++) {
+ var nameGrid = null;
+ nameGrid = makeNameGrid(partialLines[j], assetName);
+ nameGrid.x = game.width / 2 - nameGrid.width / 2;
+ nameGrid.y = y + i * cellHeight * 2 + j * cellHeight;
+ game.addChild(nameGrid);
+ }
+ }
+} //Fin de la fonction displayText
//Fonction onClickHomeButton : permet de retourner à l'accueil
//On réinitialise les variables et on affiche les miniatures des fonds
function onClickHomeButton() {
isGameStarted = false;
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.