Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: imageBackGround is not defined' in or related to this line: 'var backGround = imageBackGround;' Line Number: 484
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: this.children[e].setStageReference is not a function' in or related to this line: 'game.update = function () {' Line Number: 1100
Code edit (8 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: object.addChild is not a function' in or related to this line: 'object.addChild(nameGrid);' Line Number: 620
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: object.addChild is not a function' in or related to this line: 'object.addChild(nameGrid);' Line Number: 618
Code edit (8 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: t is undefined' in or related to this line: 'backGroundImage = LK.getAsset(image, {' Line Number: 539
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
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
===================================================================
--- original.js
+++ change.js
@@ -31,9 +31,10 @@
var cellGraphics = self.attachAsset(assetName, {
anchorX: 0.5,
anchorY: 0.5
});
- self.cellSize = cellGraphics.width;
+ self.width = cellGraphics.width;
+ self.height = cellGraphics.height;
self.clickable = true; //Indique si la cellule est cliquable
self.wordFrom = ''; //Mot d'origine de la lettre
self.letter = letter;
self.policeSize = policeSize;
@@ -73,10 +74,10 @@
var self = Container.call(this);
self.gridColumns = columns;
self.gridLines = lines;
var oneCell = new GridCell('', assetName); //Taille de reference
- self.width = oneCell.cellSize * self.gridColumns;
- self.height = oneCell.cellSize + oneCell.cellSize * (self.gridLines - 1);
+ self.width = oneCell.width * self.gridColumns;
+ self.height = oneCell.height + oneCell.height * (self.gridLines - 1);
self.clickable = true; //Indique si la grille est cliquable
self.cells = [];
self.emptyCells = []; //Liste des cellules vides
self.words = []; //Liste des mots actuellement dans la grille
@@ -84,10 +85,10 @@
for (var i = 0; i < self.gridLines; i++) {
self.cells[i] = [];
for (var j = 0; j < self.gridColumns; j++) {
var cell = new GridCell('', assetName);
- cell.x = j * cell.cellSize;
- cell.y = i * cell.cellSize + cell.cellSize / 2;
+ cell.x = j * cell.width;
+ cell.y = i * cell.height + cell.height / 2;
self.addChild(cell);
self.cells[i][j] = cell;
cell.column = j;
cell.line = i;
@@ -116,10 +117,10 @@
//Only when there is only one gridLine, add a cell to the grid with the given letter
var cell = null;
if (self.gridLines === 1) {
cell = new GridCell(letter, assetName);
- cell.x = self.gridColumns * cell.cellSize;
- cell.y = cell.cellSize / 2;
+ cell.x = self.gridColumns * cell.width;
+ cell.y = cell.height / 2;
self.addChild(cell);
self.cells[0][self.gridColumns] = cell;
cell.column = self.gridColumns;
cell.line = 0;
@@ -131,9 +132,9 @@
if (letter === '') {
self.emptyCells.push(cell);
}
self.gridColumns++;
- self.x -= cell.cellSize / 2; //Repositionnement de la grille
+ self.x -= cell.width / 2; //Repositionnement de la grille
}
return cell;
}; //Fin de la fonction addCell
self.removeCell = function (index) {
@@ -144,12 +145,12 @@
self.cells[0].splice(index, 1);
self.gridColumns--;
//Decale les cellules suivantes vers la gauche de une cellule
for (var i = index; i < self.gridColumns; i++) {
- self.cells[0][i].x -= self.cells[0][i].cellSize;
+ self.cells[0][i].x -= self.cells[0][i].width;
self.cells[0][i].column = i;
}
- self.x += cell.cellSize / 2; //Repositionnement de la grille
+ self.x += cell.width / 2; //Repositionnement de la grille
}
}; //Fin de la fonction removeCell
self.cellsPositions = function () {
//Return the absolutes positions of the cells in the game
@@ -433,9 +434,9 @@
var oneCell = new GridCell('', 'cell'); // Define oneCell variable
var nbWords = mainListsList[i].length;
var nameGrid = makeNameGrid(name + "(" + nbWords + ")", 'cellWord');
nameGrid.y = miniBackGrounds[i].height / 2 - 2.5 * nameGrid.height;
- nameGrid.width = miniBackGrounds[i].width - 2 * oneCell.cellSize;
+ nameGrid.width = miniBackGrounds[i].width - 2 * oneCell.width;
nameGrid.height = 2 * miniBackGrounds[i].height;
nameGrid.x = -nameGrid.width / 2 + oneCell.width / 2;
miniBackGrounds[i].addChild(nameGrid);
game.addChild(miniBackGrounds[i]);
@@ -562,14 +563,12 @@
if (isWordInMainList) {
//Si le mot est dans la liste principale, on compense les lettres utilisées avec récompense
for (var i = 0; i < wordGrid.gridColumns; i++) {
mainGrid.setLetter(wordGrid.cells[0][i].columnFrom, wordGrid.cells[0][i].lineFrom, wordGrid.cells[0][i].letter);
- var xAbsCell = wordGrid.cells[0][i].columnFrom * wordGrid.cells[0][i].cellSize + mainGrid.x + wordGrid.cells[0][i].cellSize / 2;
- var yAbsCell = wordGrid.cells[0][i].lineFrom * wordGrid.cells[0][i].cellSize + mainGrid.y + wordGrid.cells[0][i].cellSize / 2;
- //LK.setTimeout(function () {
- scoreTest += "i=" + i + " xAbsCell: " + xAbsCell + "/ yAbsCell: " + yAbsCell + "\n";
- scrollCoins(1, 'CostCoin', xAbsCell, yAbsCell, 50, 30, rewardForLetter, 'SoundRewardCoin', game.width / 2, MainZone.y - scoreText.height / 2);
- //}, 1000);
+ var xAbsCell = (wordGrid.cells[0][i].columnFrom + 1) * wordGrid.cells[0][i].width + mainGrid.x + wordGrid.cells[0][i].width;
+ var yAbsCell = (wordGrid.cells[0][i].lineFrom + 1) * wordGrid.cells[0][i].height + mainGrid.y + wordGrid.cells[0][i].height;
+ scoreTest += "i=" + i + " / width: " + wordGrid.cells[0][i].width + " / height: " + wordGrid.cells[0][i].height + " xAbsCell: " + xAbsCell + " / yAbsCell: " + yAbsCell + "\n";
+ scrollCoins(1, 'RewardsCoin', xAbsCell, yAbsCell, 5000, 30, rewardForLetter, 'SoundRewardCoin', game.width / 2, MainZone.y - scoreText.height / 2);
}
isWordInMainList = false;
}
wordGrid.resetGrid();
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.