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: 'TypeError: self.texte.letter is undefined' in or related to this line: 'self.texte.letter.fill = color;' Line Number: 71
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 (16 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: emptyCells is not defined' in or related to this line: 'if (emptyCells.includes(self.cells[i][j])) {' Line Number: 128
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
Initial prompt
Cool Words
===================================================================
--- original.js
+++ change.js
@@ -60,16 +60,17 @@
self.texte.x = -10;
self.texte.y = -10;
};
self.setColorToLetter = function (color) {
- self.texte.fill = color;
- self.texte.setText('Z');
+ self.texte.setStyle({
+ fill: color
+ });
};
self.onClickCell = function () {
//Fonction appelée lors du click sur la cellule
self.isClicked = true;
self.setColorToLetter("#FF0000");
- scoreTest += 1;
+ scoreTest = self.letter;
};
self.isClicked = false; //Indique si la cellule a été cliquée
});
// LettersGrid class for managing the grid of letters, same as WordGrid but with control of number of columns and lines
@@ -169,19 +170,9 @@
/****
* Game Code
****/
-var scoreTest = 0; // Define scoreTest variable in the global scope
-var lettersGrid = game.addChild(new LettersGrid(3, 1));
-lettersGrid.initializeGrid();
-lettersGrid.x = (2048 - lettersGrid.gridColumns * lettersGrid.cellSize) / 2;
-lettersGrid.y = 200;
-var mainGrid = game.addChild(new LettersGrid(6, 6));
-mainGrid.initializeGrid();
-mainGrid.x = (2048 - mainGrid.gridColumns * mainGrid.cellSize) / 2;
-mainGrid.y = 600;
-var lettersToAdd = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
-var currentLetterIndex = 0;
+var scoreTest = 0; // Define scoreTest variable
var ScoreZone = {
x: 0,
y: 0,
width: game.width,
@@ -199,8 +190,21 @@
anchorX: 0.5,
anchorY: 0
});
LK.gui.top.addChild(scoreTestText);
+var lettersGrid = game.addChild(new LettersGrid(3, 1));
+lettersGrid.initializeGrid();
+lettersGrid.x = (game.width - lettersGrid.gridColumns * lettersGrid.cellSize) / 2;
+lettersGrid.y = ScoreZone.height + lettersGrid.height / 2;
+var mainGrid = game.addChild(new LettersGrid(6, 6));
+mainGrid.initializeGrid();
+mainGrid.x = (game.width - mainGrid.gridColumns * mainGrid.cellSize) / 2;
+mainGrid.y = ScoreZone.height + 2 * lettersGrid.height;
+var lettersToAdd = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
+var currentLetterIndex = 0;
+/****
+* Functions
+****/
function updateScoreTest(nouveauScore) {
scoreTestText.setText(nouveauScore);
} //fin updateScoreTest
//Fonction pickAndShakeSingleWord : permet de choisir un mot dans la liste des mots et de le mélanger
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.