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
User prompt
Please fix the bug: 'TypeError: word is undefined' in or related to this line: 'var wordShuffled = word.split('').sort(function () {' Line Number: 394
User prompt
Please fix the bug: 'TypeError: liste is undefined' in or related to this line: 'var randomIndex = Math.floor(Math.random() * liste.length);' Line Number: 390
Code edit (9 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: 381
Code edit (1 edits merged)
Please save this source code
Code edit (19 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: LK.Sprite is not a constructor' in or related to this line: 'var backGroundImage = game.addChild(new LK.Sprite('BackGroundImage', {' Line Number: 268
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (7 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: cell is not defined' in or related to this line: 'scoreTest += cell.letter;' Line Number: 401
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: '[Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: https://beta.frvr.ai/game-template/index-0.0.3.html?frame_id=0&v2=1&1715679717556&disable_analytics=1 line 181 > injectedScript :: execute/window.getRenderer/t.Text.prototype.updateText :: line 1" data: no]' in or related to this line: 'scoreTestText.setText(nouveauScore);' Line Number: 357
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 (23 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: Button is not defined' in or related to this line: 'var validateButton = new Button('Validate', {' Line Number: 271
===================================================================
--- original.js
+++ change.js
@@ -307,9 +307,10 @@
mainGrid.initializeGrid();
mainGrid.x = (game.width - mainGrid.width) / 2 + lettersGrid.height / 2;
mainGrid.y = ScoreZone.height + 2 * lettersGrid.height;
var wordGrid = null;
-var wordsMainList = ["ALABAMA", "ALASKA", "ARIZONA", "ARKANSAS"]; //Liste principale des mots
+//var wordsMainList = ["ALABAMA", "ALASKA", "ARIZONA", "ARKANSAS"]; //Liste principale des mots
+var wordsMainList = animaux || [];
initWordGrid();
var validateButton = new Button('', {
x: game.width / 2,
y: wordGrid.y + wordGrid.height + 400,
@@ -372,22 +373,8 @@
return 0.5 - Math.random();
}).join('');
return wordShuffled;
} //Fin de la fonction pickAndShakeSingleWord
-//Fonction pickNShakeWord(liste) : permet de choisir un mot dans une liste de mots et de le mélanger
-function pickNShakeWord() {
- var liste = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
- var randomIndex = Math.floor(Math.random() * liste.length);
- var word = liste[randomIndex];
- scoreTest = " / " + word;
- if (!word) {
- return '';
- }
- var wordShuffled = word.split('').sort(function () {
- return 0.5 - Math.random();
- }).join('');
- return wordShuffled;
-} //Fin de la fonction pickNShakeWord
//Fonction pickAndShakeWords : permet de choisir plusieurs mots dans la liste des mots et de les mélanger
function pickAndShakeWords(numberOfWords) {
var wordsShuffeled = [];
for (var i = 0; i < numberOfWords; i++) {
@@ -395,19 +382,8 @@
wordsShuffeled.push(shuffledWord);
}
return wordsShuffeled;
} //Fin de la fonction pickAndShakeWords
-//Fonction pickNShakeWords : permet de choisir plusieurs mots dans une liste de mots et de les mélanger
-function pickNShakeWords() {
- var liste = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
- var numberOfWords = arguments.length > 1 ? arguments[1] : undefined;
- var wordsShuffeled = [];
- for (var i = 0; i < numberOfWords; i++) {
- var shuffledWord = pickNShakeWord(liste);
- wordsShuffeled.push(shuffledWord);
- }
- return wordsShuffeled;
-} //Fin de la fonction pickNShakeWords
//Fonction stackLettersFromWords : permet de stocker les lettres de plusieurs mots dans la file d'attente lettersToAdd
function stackLettersFromWords(words) {
for (var i = 0; i < words.length; i++) {
var word = words[i];
@@ -487,10 +463,9 @@
//Chargement initiale de la grille principale si nécessaire (vide):
//mot(s) est choisi au hasard dans la liste principale,
//il est mélangé et les lettres sont directement ajoutées à la grille principale avec la fonction addRandomLetter
if (mainGrid.isEmpty() && !isGameStarted) {
- //var wordsToBegin = pickAndShakeWords();
- var wordsToBegin = pickNShakeWords(wordsMainList, 1);
+ var wordsToBegin = pickAndShakeWords(1);
var wordCompiled = "";
for (var i = 0; i < wordsToBegin.length; i++) {
wordCompiled += wordsToBegin[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.