Code edit (22 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: letter is not defined' in or related to this line: 'var blackboardText = new Text2(letter, {' Line Number: 61
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
in function resetgamefornextlevel, make a few seconds long pause before displaylettersniline is called, and show a message to the player: next level
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: 'Uncaught ReferenceError: Lk is not defined' in or related to this line: 'Lk.getSound('correctWord').play();' Line Number: 114
Code edit (5 edits merged)
Please save this source code
User prompt
play the tap sound when a lettertile is tapped
Code edit (8 edits merged)
Please save this source code
User prompt
play the background music when the game starts, and let it repeat until gameover
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: submitButon is not defined' in or related to this line: 'submitButon.destroy();' Line Number: 293
Code edit (1 edits merged)
Please save this source code
Code edit (16 edits merged)
Please save this source code
User prompt
please implement function gameWon such that it displays a message 'Congratulations! You found all the worrd!' for a few seconds before calling KLshowGameOver.
Code edit (1 edits merged)
Please save this source code
Code edit (8 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught TypeError: letterTilesArr is not a function' in or related to this line: 'letterTilesArr(letterTile);' Line Number: 235
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: 'Uncaught TypeError: Cannot read properties of undefined (reading 'anchor')' in or related to this line: 'scoreTxt.anchor.set(0.5, 0);' Line Number: 132
Code edit (2 edits merged)
Please save this source code
User prompt
when a word is correct, remove it from the levels[currentLevel].words array
===================================================================
--- original.js
+++ change.js
@@ -215,17 +215,17 @@
var streak = 0;
var blackBoardArr = [];
var wholeBlackBoardArr = [];
var currentWord = "";
-var levelTxt = new Text2('Level 1', {
+var streakTxt = new Text2('Streak: 0 (x1)', {
size: 60,
- fill: "#ADD8E6",
+ fill: "#FFFFED",
stroke: "#000000",
strokeThickness: 10,
weight: 800
});
-levelTxt.anchor.set(1.2, 0);
-LK.gui.topRight.addChild(levelTxt);
+streakTxt.anchor.set(0.5, 0);
+LK.gui.topLeft.addChild(streakTxt);
var scoreTxt = new Text2('Score: 0', {
size: 60,
fill: "#ADE6D8",
stroke: "#000000",
@@ -233,8 +233,17 @@
weight: 800
});
scoreTxt.anchor.set(0.5, 0);
LK.gui.top.addChild(scoreTxt);
+var levelTxt = new Text2('Level 1', {
+ size: 60,
+ fill: "#ADD8E6",
+ stroke: "#000000",
+ strokeThickness: 10,
+ weight: 800
+});
+levelTxt.anchor.set(1.2, 0);
+LK.gui.topRight.addChild(levelTxt);
var blackboardOffsetX = 0;
var blackboardOffsetY = 0;
function writeLetterOnBlackboard(letter) {
/*
A smooth, clean, blank and empty scrabble tile for a game.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A clean, warm and welcoming classroom in a school, facing the blackboard.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A small golden star. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.