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
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: wordGrid.words[0] is undefined' in or related to this line: 'return true;' Line Number: 267
Code edit (1 edits merged)
Please save this source code
Code edit (20 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: clueButtonLetter is not defined' in or related to this line: 'scrollCostCoins(clueButtonLetter.x, clueButtonLetter.y, 1, 10);' Line Number: 549
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: 'Timeout.tick error: options is undefined' in or related to this line: 'var imageToScrollRescale = {' Line Number: 775
Code edit (15 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: options is undefined' in or related to this line: 'var imageToScrollRescale = {' Line Number: 775
Code edit (1 edits merged)
Please save this source code
Code edit (10 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: options is undefined' in or related to this line: 'var imageToScrollRescale = {' Line Number: 748
Code edit (7 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: createRewardImages is not defined' in or related to this line: 'createRewardImages('RewardsCoin', tableauFrom);' Line Number: 469
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: 'TypeError: imagesToScrollRescale[i] is undefined' in or related to this line: 'if (imagesToScrollRescale[i].isDestroyedOnEnd) {' Line Number: 725
===================================================================
--- original.js
+++ change.js
@@ -272,8 +272,21 @@
/****
* Game Code
****/
+// Function to create reward images
+function createRewardImages(asset, tableauFrom) {
+ createImages(asset, tableauFrom, {
+ xToReach: game.width / 2,
+ yToReach: MainZone.y - scoreText.height / 2,
+ scaleToReach: 1.0,
+ nbTicksLeft: Math.floor(Math.random() * 30) + 40,
+ animate: true,
+ isDestroyedOnEnd: true,
+ soundOnEnd: 'SoundRewardCoin',
+ valueToAddToScore: 10
+ });
+}
var clueWord = '';
// Button class for creating buttons in the game
/****
* GAME DESCRIPTION:
@@ -431,9 +444,9 @@
if (validateWord(mainGrid.words)) {
//On vide la grille des lettres formant le mot final apres x secondes
LK.setTimeout(function () {
var tableauFrom = wordGrid.cellsPositions();
- createRewardImages('RewardsCoin', tableauFrom);
+ createImages('RewardsCoin', tableauFrom);
wordGrid.resetGrid();
initWordGrid();
}, 1000);
if (mainGrid.isEmpty()) {
@@ -445,8 +458,9 @@
createRewardImages('RewardsCoin', tableauFrom);
if (imagesToScrollRescale.length > 0) {
imagesToScrollRescale[0].valueToAddToScore = 100; //Bonus for emptying the main grid
imagesToScrollRescale[0].nbTicksLeft = 30;
+ imagesToScrollRescale[0].soundOnEnd = 'SoundEmptyGrid';
}
isMGRefillrequired = true;
}
} else {
@@ -761,24 +775,24 @@
}
}
}
} //fin scrollRescaleImages
-//Fonction createRewardImages : permet de créer plusieurs images de récompense
+//Fonction createImages : permet de créer plusieurs images à scrollrescaler
//Chaque image est crée à l'emplacement donnée dans le tableauFrom composé de (x, y)
-function createRewardImages(asset, tableauFrom) {
+function createImages(asset, tableauFrom, options) {
for (var i = 0; i < tableauFrom.length; i++) {
- var rewardImage = createImageToSrollRescale(asset, tableauFrom[i].x, tableauFrom[i].y);
- rewardImage.xToReach = game.width / 2;
- rewardImage.yToReach = MainZone.y - scoreText.height / 2;
- rewardImage.scaleToReach = 1.0;
- rewardImage.nbTicksLeft = Math.floor(Math.random() * 30) + 40;
- rewardImage.animate = true;
- rewardImage.isDestroyedOnEnd = true;
- rewardImage.soundOnEnd = 'Blip';
- rewardImage.valueToAddToScore = 10;
- imagesToScrollRescale.push(rewardImage);
+ var image = createImageToSrollRescale(asset, tableauFrom[i].x, tableauFrom[i].y);
+ image.xToReach = game.width / 2 || options.xToReach;
+ image.yToReach = MainZone.y - scoreText.height / 2 || options.yToReach;
+ image.scaleToReach = 1.0 || options.scaleToReach;
+ image.nbTicksLeft = Math.floor(Math.random() * 30) + 40 || options.nbTicksLeft;
+ image.animate = true || options.animate;
+ image.isDestroyedOnEnd = true || options.isDestroyedOnEnd;
+ image.soundOnEnd = 'SoundRewardCoin' || options.soundOnEnd;
+ image.valueToAddToScore = 10 || options.valueToAddToScore;
+ imagesToScrollRescale.push(image);
}
-} //fin createRewardImages
+} //fin createImages
/****
* Main loop
****/
game.update = function () {
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.