User prompt
please place an instance of the gamelogo center screen top
Code edit (3 edits merged)
Please save this source code
User prompt
please loop the testmusic instead of the background music
User prompt
make a background music asset to be looped continously
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'map')' in or related to this line: 'currentLevel = levels[currentLevelID].map(function (arr) {' Line Number: 960
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'map')' in or related to this line: 'currentLevel = levels[currentLevelID].map(function (arr) {' Line Number: 960
Code edit (3 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 n = source[0].length;' Line Number: 793
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: 'ReferenceError: ty is not defined' in or related to this line: 'console.log('startx and y:', t.x, ty);' Line Number: 139
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
please use the backgrounfimage asset as a background by adding it just before the scorelabel is added
Code edit (13 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: arr.slice is not a function' in or related to this line: 'return arr.slice();' Line Number: 858
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: arr.slice is not a function' in or related to this line: 'return arr.slice();' Line Number: 853
Code edit (16 edits merged)
Please save this source code
User prompt
Please fix the bug: 'l5 is not defined' in or related to this line: 'var levels = [l1a, l5a, l1b, l1c, l1d, l1e, l1f, l1g, l2a, l2b, l2c, l2d, l2e, l2f, l2g, l3a, l4a, l5];' Line Number: 444
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (11 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -381,9 +381,10 @@
levelLabel.x = 1024; // Position near the right edge
levelLabel.y = 100; // Position at the top
//LK.gui.topRight.addChild(scoreLabel);
game.addChild(levelLabel);
-var colors = ['0x000000', '0xffffff', '0xffff00', '0xff0000', '0x000055', '0x00ff00', '0xff00ff'];
+// 0 black 1 white 2 yellow 3 red 4 blue 5 green 6 purple 7 grey 8 brown
+var colors = ['0x000000', '0xffffff', '0xffff00', '0xff0000', '0x000055', '0x00ff00', '0xff00ff', '0xdddddd', '0x827364'];
var gridSize = 5;
var spacingRatio = 0.2;
var boardSize = 1300;
function calculateTileSize() {
@@ -402,16 +403,20 @@
var l1b = [[0, 0, 0, 0, 0], [0, 0, 4, 0, 0], [0, 5, 4, 5, 0], [0, 5, 0, 5, 0], [0, 0, 0, 0, 0]];
var l1c = [[0, 0, 0, 0, 0], [0, 3, 0, 3, 0], [0, 0, 2, 0, 0], [0, 3, 0, 3, 0], [0, 0, 0, 0, 0]];
var l1d = [[0, 0, 0, 0, 0], [0, 6, 4, 6, 0], [0, 4, 0, 4, 0], [0, 6, 4, 6, 0], [0, 0, 0, 0, 0]];
var l1e = [[0, 0, 0, 0, 0], [0, 0, 0, 5, 0], [0, 0, 5, 3, 0], [0, 5, 3, 3, 0], [0, 0, 0, 0, 0]];
-var l1f = [[0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 1, 2, 1, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0]];
+var l1f = [[0, 0, 7, 7, 7], [0, 0, 0, 8, 7], [0, 0, 8, 0, 7], [0, 8, 0, 0, 0], [0, 0, 0, 0, 0]];
+var l1g = [[0, 0, 1, 0, 0], [0, 0, 3, 0, 0], [0, 3, 3, 3, 0], [0, 3, 3, 3, 0], [0, 1, 1, 1, 0]];
var l2 = [[0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0], [0, 4, 1, 1, 4, 0], [0, 0, 2, 2, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
var l3 = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 2, 2, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0], [0, 0, 2, 2, 0, 0, 0], [0, 2, 2, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]];
var l4 = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 2, 2, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 2, 2, 0, 0, 0, 0], [0, 2, 2, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
var l5 = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 3, 3, 3, 0], [0, 0, 2, 2, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0], [0, 0, 2, 2, 0, 0, 0, 0, 0], [0, 2, 2, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]];
-var levels = [l1a, l1b, l1c, l1d, l1e, l1f, l2, l3, l4, l5];
+var levels = [l1g, l1g, l1a, l1b, l1c, l1d, l1e, l1f, l1g, l2, l3, l4, l5];
var currentLevelID = 0;
-var currentLevel = levels[currentLevelID].slice(0); //copy without reference, so we have original for retry/level reset.
+//var currentLevel = levels[currentLevelID].slice(0); //copy without reference, so we have original for retry/level reset.
+var currentLevel = levels[currentLevelID].map(function (arr) {
+ return arr.slice();
+});
var levelContainer = new Container();
levelContainer.x = 1024;
levelContainer.y = 2732 / 2;
game.addChild(levelContainer);
@@ -808,8 +813,9 @@
// If we haven't run out of levels, fo to the next one.
if (currentLevelID != levels.length - 1) {
currentLevelID++;
currentLevel = levels[currentLevelID].slice(0);
+ console.log('new level is', currentLevel);
gridSize = currentLevel.length;
tileSize = calculateTileSize();
board.destroy();
board = new Board();
A large calm background drawing for a puzzle game, in dark calm blueish colors and non-confusing content. High definition. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A quadratic polished dark blue marble slate. Front perspective with right angles. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A white question mark in a circle, like for a help button in a game.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A white X in a circle, like for a close window button in a game. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A white questionmark on a black background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A green check mark on a dark background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.