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
Code edit (1 edits merged)
Please save this source code
Code edit (18 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: clueButton is null' in or related to this line: 'clueButton = new Button('', {' Line Number: 433
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 (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'y')' in or related to this line: 'var validateButton = new Button('', {' Line Number: 302
Code edit (8 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'width')' in or related to this line: 'self.width = options.width || 200;' Line Number: 56
Code edit (1 edits merged)
Please save this source code
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: 'TypeError: wordsMainList is undefined' in or related to this line: 'var randomIndex = Math.floor(Math.random() * wordsMainList.length);' Line Number: 382
Code edit (4 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -73,9 +73,9 @@
self.gridColumns = columns;
self.gridLines = lines;
var oneCell = new GridCell('', assetName); //Taille de reference
self.width = oneCell.cellSize * self.gridColumns;
- self.height = oneCell.cellSize * self.gridLines;
+ self.height = oneCell.cellSize + oneCell.cellSize * (self.gridLines - 1);
self.clickable = true; //Indique si la grille est cliquable
self.cells = [];
self.emptyCells = []; //Liste des cellules vides
self.initializeGrid = function () {
@@ -84,10 +84,8 @@
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;
- //self.width += cell.cellSize;
- //self.height += cell.cellSize;
self.addChild(cell);
self.cells[i][j] = cell;
cell.column = j;
cell.line = i;
@@ -98,10 +96,8 @@
cell.clickable = self.clickable;
self.emptyCells.push(cell);
}
}
- //self.width = self.gridColumns * self.cells[0][0].cellSize;
- //self.height = self.gridLines * self.cells[0][0].cellSize;
}; //Fin de la fonction initializeGrid
self.resetGrid = function () {
//Réinitialise la grille : remove all cells and repositionnement de la grille
for (var i = 0; i < self.gridLines; i++) {
@@ -386,9 +382,9 @@
function setValidateButton(asset) {
var validateButton = new Button('', {
assetName: asset,
x: game.width / 2,
- y: wordGrid.y + wordGrid.height + 400,
+ y: wordGrid.y + wordGrid.height + 300,
width: 300,
height: 300,
fill: "#00FF00",
text: {
@@ -403,10 +399,10 @@
function initWordGrid() {
//Initialise la grille des lettres formant le mot
wordGrid = game.addChild(new LettersGrid(0, 1, 'cellWord'));
wordGrid.initializeGrid();
- wordGrid.x = (game.width - wordGrid.width) / 2;
- wordGrid.y = ScoreZone.height + 300 + mainGrid.height + 200;
+ wordGrid.x = game.width / 2 + 100;
+ wordGrid.y = ScoreZone.height + mainGrid.height + 300;
} //Fin de la fonction initWordGrid
//Fonction pickAndShakeSingleWord : permet de choisir un mot dans la liste des mots et de le mélanger
function pickAndShakeSingleWord() {
var randomIndex = Math.floor(Math.random() * wordsMainList.length);
@@ -465,8 +461,9 @@
wordGrid.colorAllCells(isWordValid ? "#00FF00" : "#FF0000");
return isWordValid;
} //Fin de la fonction validateWord
game.update = function () {
+ scoreTest = wordGrid.width;
updateScoreTest(scoreTest);
updateScore(score);
//Recherche de la lettre cliquée dans la mainGrid et ajout de la lettre à la liste des lettres formant le mot
for (var i = 0; i < mainGrid.gridLines; i++) {
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.