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
@@ -349,8 +349,16 @@
var numRunningTweens = 0; // input is blocked while tweens running, so increment this when a tween starts, nd decrement when tween ends.
var outlierDirectionCounter = 0; //0; // increment to allow outliers spawning on different side each turn.
var playerScore = 0;
var highScore = storage.highScore || 0;
+// Add background image
+var backgroundImage = LK.getAsset('backgroundImage', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 1024,
+ y: 1366
+});
+game.addChild(backgroundImage);
// Create and position the score label
var scoreLabel = new Text2('Score\n0', {
size: 60,
fill: 0xFFFFFF,
@@ -397,9 +405,9 @@
board.x = 1024;
board.y = 2732 / 2;
game.addChild(board);
// 0 black 1 white 2 yellow 3 red 4 blue 5 green 6 purple 7 grey 8 brown 9 skin
-var colors = ['0x000000', '0xffffff', '0xffff00', '0xff0000', '0x000055', '0x00ff00', '0xff00ff', '0xdddddd', '0x827364', '0xecbcb4'];
+var colors = ['0x000000', '0xffffff', '0xffff00', '0xff0000', '0x000066', '0x00ff00', '0xff00ff', '0xbbbbbb', '0x827364', '0xecbcb4'];
// 5x5 levels.
var l1a = [[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 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]];
@@ -440,11 +448,25 @@
var l5e = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 2, 0, 0, 0, 0, 0, 0, 0], [0, 3, 3, 1, 3, 3, 3, 3, 0], [0, 3, 3, 1, 3, 3, 3, 0, 0], [0, 1, 1, 1, 1, 1, 1, 0, 0], [0, 3, 3, 1, 3, 3, 3, 0, 0], [0, 3, 3, 1, 3, 3, 3, 3, 0], [0, 8, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]];
var l5f = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 5, 4, 1, 1, 4, 0, 0], [0, 5, 5, 4, 4, 4, 5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0, 0, 0, 0, 0, 0, 0, 0]];
+var l6b = [[0, 0, 4, 4, 4, 4, 4, 4, 0, 0], [0, 4, 4, 4, 4, 4, 4, 4, 4, 0], [0, 0, 8, 8, 8, 8, 8, 8, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 1, 4, 1, 1, 4, 1, 1, 0], [0, 2, 2, 2, 2, 2, 2, 2, 2, 0], [0, 0, 0, 4, 3, 3, 4, 0, 0, 0], [0, 0, 0, 4, 4, 4, 4, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 2, 0, 0, 2, 0, 0, 0]];
+var l6c = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 5, 0, 0, 0, 0, 0, 0, 0, 0], [0, 5, 5, 0, 0, 0, 0, 0, 0, 0], [0, 5, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 6, 6, 0, 0, 0], [0, 0, 0, 1, 2, 2, 6, 6, 3, 0], [0, 4, 0, 0, 2, 2, 5, 0, 3, 0], [0, 4, 0, 0, 3, 5, 5, 0, 3, 0], [0, 4, 4, 3, 3, 3, 5, 0, 3, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
+var l6d = [];
+var l6e = [];
+var l6f = [];
+var l6g = [];
+// Levels ordered by grid size, for shuffling while maintining difficulty ramping.
+var levels5 = [l1a, l1b, l1c, l1d, l1e, l1f, l1g];
+var levels6 = [l2a, l2b, l2c, l2d, l2e, l2f, l2g];
+var levels7 = [l3a, l3b, l3c, l3d, l3e, l3f, l3g];
+var levels8 = [l4a, l4b, l4c, l4d, l4e, l4f, l4g];
+var levels9 = [l5a, l5b, l5c, l5d, l5e, l5f, l5g];
+var levels10 = [l6a, l6b, l6c, l6d, l6e, l6f, l6g];
// All levels in one array.
-var levels = [l1a, l6a, l1b, l1c, l1d, l1e, l1f, l1g, l2a, l2b, l2c, l2d, l2e, l2f, l2g, l3a, l4a, l5a];
+//var levels = levels5.concat(levels6, levels7, levels8, levels9, levels10);
+var levels = [l1a, l6c, l1b, l1c, l1d, l1e, l1f, l1g, l2a, l2b, l2c, l2d, l2e, l2f, l2g, l3a, l4a, l5a];
var currentLevelID = 0;
// Copy without reference, so we have original for retry/level reset.
var currentLevel = levels[currentLevelID].map(function (arr) {
return Array.isArray(arr) ? arr.slice() : [];
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.