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
@@ -378,9 +378,9 @@
fill: "#00ff00",
anchorX: 0.5,
anchorY: 0
});
-LK.gui.top.addChild(scoreText);
+//LK.gui.top.addChild(scoreText);
/****
* Main zone foreground
****/
var policeSize = 128;
@@ -409,24 +409,29 @@
//Les assets de fond sont stockés dans la liste backGroundsList
function displayminiBackGrounds() {
var nbBoutons = backGroundsList.length;
for (var i = 0; i < backGroundsList.length; i++) {
+ var name = namesList[i];
miniBackGrounds[i] = new Button('', {
assetName: backGroundsList[i],
mainList: mainListsList[i],
- anchorX: 0,
- anchorY: 0,
x: game.width / 2,
- y: ScoreZone.height + i * MainZone.height / nbBoutons,
+ y: ScoreZone.height + this.height / 2 + i * (MainZone.height - this.height / 2) / nbBoutons,
width: game.width,
- height: MainZone.height / nbBoutons,
+ height: (MainZone.height - this.height / 2) / nbBoutons,
fill: "#00FF00",
text: {
- size: 50,
+ size: 100,
fill: "#000000"
},
onClick: onClickMiniBackGround
});
+ var nameGrid = makeNameGrid(name, 'cellWord');
+ nameGrid.x = miniBackGrounds[i].width / 2 - nameGrid.width / 2;
+ nameGrid.y = miniBackGrounds[i].height / 2 - 2.5 * nameGrid.height;
+ nameGrid.width = miniBackGrounds[i].width;
+ nameGrid.height = miniBackGrounds[i].height;
+ miniBackGrounds[i].addChild(nameGrid);
game.addChild(miniBackGrounds[i]);
}
} //Fin de la fonction displayminiBackGrounds
//Fonction onClickMiniBackGround : permet de sélectionner un thème de jeu
@@ -438,10 +443,24 @@
initGameThema(mainList, backGround);
mainList = mainList || [];
scoreTest = "Thema : " + this.assetName + "mainListSize : " + mainList.length;
isThemaSelected = true;
+ //On cache les miniatures des fonds
+ for (var i = 0; i < miniBackGrounds.length; i++) {
+ game.removeChild(miniBackGrounds[i]);
+ }
+ LK.gui.top.addChild(scoreText);
}
} //Fin de la fonction onClickMiniBackGround
+//La largeur de la grille ne doit pas dépasser la largeur de la zone de jeu, la taille des cellules doit être adaptée
+function makeNameGrid(word, assetName) {
+ var grid = new LettersGrid(word.length, 1, assetName);
+ grid.initializeGrid();
+ for (var i = 0; i < word.length; i++) {
+ grid.setLetter(i, 0, word[i]);
+ }
+ return grid;
+} //Fin de la fonction makeNameGrid
//Fonction initGameThema : permet d'initialiser le thème du jeu (liste des mots et image de fond)
function initGameThema(mainList, backGround) {
isGameStarted = false;
isMGRefillrequired = 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.