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
Code edit (1 edits merged)
Please save this source code
Code edit (15 edits merged)
Please save this source code
User prompt
make a small star explosion on the blackboard when a word is correct
===================================================================
--- original.js
+++ change.js
@@ -111,16 +111,20 @@
blackBoardArr = [];
}
var blackBoardArr = [];
var currentWord = "";
-var scoreTxt = new Text2('0', {
- size: 150,
+var levelTxt = new Text2('Level 1', {
+ size: 60,
fill: "#ADD8E6",
stroke: "#000000",
strokeThickness: 10
});
-scoreTxt.anchor.set(0.5, 0);
-LK.gui.top.addChild(scoreTxt);
+var scoreTxt = new Text2('Score: 0', {
+ size: 60,
+ fill: "#ADE6D8",
+ stroke: "#000000",
+ strokeThickness: 10
+});
var blackboardOffsetX = 0;
var blackboardOffsetY = 0;
function writeLetterOnBlackboard(letter) {
var blackboardText = new Text2(letter, {
@@ -158,10 +162,10 @@
// Function to reset the game state for the new level
function resetGameStateForNewLevel() {
// Logic to reset the game state for the new level
// For example, clear the board, reset the score, etc.
- LK.setScore(0);
- scoreTxt.setText(LK.getScore());
+ //LK.setScore(0);
+ //scoreTxt.setText(LK.getScore());
// Reset the letter tiles
game.children.forEach(function (child) {
if (child instanceof LetterTile) {
child.alpha = 1;
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.