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
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'scoreTest = "Thema : " + this.assetName + "mainListSize : " + mainList.length;' Line Number: 464
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'scoreTest = "Thema : " + this.assetName + "mainListSize : " + this.mainList.length;' Line Number: 459
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: 'TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'if (wordsMainList.length == 0) {' Line Number: 723
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'if (wordsMainList.length == 0) {' Line Number: 723
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'if (wordsMainList.length == 0) {' Line Number: 722
Code edit (11 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'var randomIndex = Math.floor(Math.random() * wordsMainList.length);' Line Number: 723
User prompt
Please fix the bug: 'ReferenceError: i is not defined' in or related to this line: 'initGameThema(mainListsList[i], backGroundsList[i]);' Line Number: 459
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading '0')' in or related to this line: 'if (mainGrid.cells[i][j].isClicked) {' Line Number: 909
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (12 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: word is not defined' in or related to this line: 'scoreTest = "firtWord: " + word;' Line Number: 922
Code edit (1 edits merged)
Please save this source code
Code edit (15 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: wordGgrid is not defined' in or related to this line: 'var letter = clueWord[wordGgrid.gridColumns];' Line Number: 633
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: wordOfGrid is undefined' in or related to this line: 'if (notEnoughtMoneyForDrop || clueWord == '' && !wordGrid.isEmpty() || clueWord.length < wordOfGrid.length) {' Line Number: 903
===================================================================
--- original.js
+++ change.js
@@ -280,8 +280,9 @@
/****
* Game Code
****/
+// Button class for creating buttons in the game
/****
* GAME DESCRIPTION:
* Game Principle:
* -There is a board filled with letters, where the player selects letters from a partially filled grid.
@@ -309,9 +310,8 @@
* If the word is not valid, the letters forming the word are returned to their original position in the grid.
* A new word appears randomly within the grid to empty spaces.
* If there is no more space in the grid, the game is over.
****/
-// Button class for creating buttons in the game
var backGroundsList = ["BackGroundPlanetesNSatellites", "BackGroundUSAStates", "BackGroundEuropeanCapitales"]; //Liste des assets de fond
var mainListsList = [planetesNsatellites, usaStates, europeanCapitales]; //Liste des listes de mots principales
var usaStates = ["ALABAMA", "ALASKA", "ARIZONA", "ARKANSAS", "CALIFORNIA", "COLORADO", "CONNECTICUT", "DELAWARE", "FLORIDA", "GEORGIA", "HAWAII", "IDAHO", "ILLINOIS", "INDIANA", "IOWA", "KANSAS", "KENTUCKY", "LOUISIANA", "MAINE", "MARYLAND", "MASSACHUSETTS", "MICHIGAN", "MINNESOTA", "MISSISSIPPI", "MISSOURI", "MONTANA", "NEBRASKA", "NEVADA", "NEW-HAMPSHIRE", "NEW-JERSEY", "NEW-MEXICO", "NEW-YORK", "NORTH-CAROLINA", "NORTH-DAKOTA", "OHIO", "OKLAHOMA", "OREGON", "PENNSYLVANIA", "RHODE-ISLAND", "SOUTH-CAROLINA", "SOUTH-DAKOTA", "TENNESSEE", "TEXAS", "UTAH", "VERMONT", "VIRGINIA", "WASHINGTON", "WEST-VIRGINIA", "WISCONSIN", "WYOMING"];
var europeanCapitales = ["AMSTERDAM", "ANDORRA-LA-VELLA", "ANKARA", "ATHENS", "BELGRADE", "BERLIN", "BERN", "BRATISLAVA", "BRUSSELS", "BUCHAREST", "BUDAPEST", "CHISINAU", "COPENHAGEN", "DUBLIN", "HELSINKI", "KIEV", "LISBON", "LJUBLJANA", "LONDON", "LUXEMBOURG", "MADRID", "MINSK", "MONACO", "MOSCOW", "NICOSIA", "OSLO", "PARIS", "PODGORICA", "PRAGUE", "REYKJAVIK", "RIGA", "ROME", "SAN-MARINO", "SARAJEVO", "SKOPJE", "SOFIA", "STOCKHOLM", "TALLINN", "TBILISI", "TIRANA", "VADUZ", "VALLETTA", "VIENNA", "VILNIUS", "WARSAW", "ZAGREB"];
@@ -394,12 +394,32 @@
var animatingImageOn = false; //Drapeau indiquant qu'une image est a scrollscaller
var imagesToScrollRescale = []; //Liste des images a scrollscaller
//initGameThema(planetesNsatellites, 'BackGroundPlanetesNSatellites');
//initGameThema(usaStates, 'BackGroundUSAStates');
-initGameThema(europeanCapitales, 'BackGroundEuropeanCapitales');
+//initGameThema(europeanCapitales, 'BackGroundEuropeanCapitales');
+displayminiBackGrounds();
/****
* Functions
****/
+//Fonction displayminiBackGrounds : permet d'afficher les miniatures des fonds et d'y associer un événement de click
+//Les assets de fond sont stockés dans la liste backGroundsList
+function displayminiBackGrounds() {
+ var backGrounds = [];
+ for (var i = 0; i < backGroundsList.length; i++) {
+ backGrounds[i] = LK.getAsset(backGroundsList[i], {
+ x: 100 * i,
+ y: 0,
+ width: 100,
+ height: 100
+ });
+ backGrounds[i].on('down', function () {
+ if (!isGameStarted) {
+ initGameThema(mainListsList[i], backGroundsList[i]);
+ }
+ });
+ game.addChild(backGrounds[i]);
+ }
+} //Fin de la fonction displayminiBackGrounds
//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;
@@ -569,9 +589,9 @@
mainGrid.colorWordCells(word, "#" + randomColor);
LK.setTimeout(function () {
mainGrid.colorWordCells(word, "#000000");
scrollCostCoins(clueButtonWord.x, clueButtonWord.y, word.length, costForWord);
- }, 3000);
+ }, 5000);
}
} //Fin de la fonction onClickClueButtonWord
//Fonction setClueButtonWord : permet de définir le bouton d'indice focus word
function setClueButtonWord(asset) {
@@ -861,9 +881,9 @@
scrollRescaleImages();
//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++) {
for (var j = 0; j < mainGrid.gridColumns; j++) {
- if (mainGrid.cells[i][j].isClicked) {
+ if (mainGrid.cells[i] && mainGrid.cells[i][j] && mainGrid.cells[i][j].isClicked) {
var newCell = addCellLetterToWord(mainGrid.cells[i][j].letter);
if (newCell) {
newCell.columnFrom = j;
newCell.lineFrom = 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.