Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting '3')' in or related to this line: 'currentLevel[self.gridY][self.gridX] = self.colorIndex;' Line Number: 189
Code edit (1 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: 'for (var i = 0; i < a.length; i++) {' Line Number: 357
Code edit (1 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: 'for (var i = 0; i < a.length; i++) {' Line Number: 357
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'for (var i = 0; i < a.length; i++) {' Line Number: 357
Code edit (1 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot set properties of undefined (setting '5')' in or related to this line: 'currentLevel[self.gridY][self.gridX] = self.colorIndex;' Line Number: 189
Code edit (13 edits merged)
Please save this source code
User prompt
Please fix the bug: 'newPosition is not defined' in or related to this line: 'if (newPosition != 999) {' Line Number: 638
Code edit (1 edits merged)
Please save this source code
Code edit (12 edits merged)
Please save this source code
User prompt
Please fix the bug: 'levelContainer.children.findAll is not a function' in or related to this line: 'var outliers = levelContainer.children.findAll(function (child) {' Line Number: 548
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: 'boxspacing is not defined' in or related to this line: 'b.y = offset + startY + i * (boxSize + boxspacing); // determine this' Line Number: 448
Code edit (1 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'cBox is not defined' in or related to this line: 'cBox.width = cBox.height = tileSize;' Line Number: 428
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (13 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Set is not a constructor' in or related to this line: 'return n;' Line Number: 176
===================================================================
--- original.js
+++ change.js
@@ -334,9 +334,11 @@
var l1 = [[0, 0, 0, 0, 0], [0, 1, 1, 1, 0], [0, 1, 2, 1, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0]];
var l2 = [[0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0], [0, 0, 2, 2, 0, 0], [0, 0, 1, 1, 0, 0], [0, 0, 2, 2, 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 levels = [l1, l2, l3];
-var currentLevel = levels[2].slice(0); //copy without reference, so we have original for retry/level reset.
+var currentLevel = levels[2].map(function (arr) {
+ return arr.slice();
+}); // Create a deep copy of the level to avoid reference issues
var levelContainer = new Container();
levelContainer.x = 1024;
levelContainer.y = 2732 / 2;
game.addChild(levelContainer);
@@ -634,15 +636,45 @@
t.fadeOut(); // TODO: Maybe replace this with a flyout animation instead.
}
}
}
-moveIn();
+//moveIn();
+var GAME_STATE = 0;
+// 0: Waiting for input
+// 1: Removing tiles
+// 2: Moving outliers in
+// 3: Generating new outliers.
game.update = function () {
- if (LK.ticks % 12 == 0) {
- //console.log(numRunningTweens);
+ if (GAME_STATE == 0) {
+ // awaiting user input
if (numRunningTweens > 0) {
- GAME_IS_CLICKABLE = false;
- } else {
+ GAME_STATE = 1;
+ }
+ } else if (GAME_STATE == 1) {
+ // removing tiles
+ if (numRunningTweens == 0) {
+ moveIn();
+ GAME_STATE = 2;
+ }
+ } else if (GAME_STATE == 2) {
+ // moving outliers in
+ if (numRunningTweens == 0) {
+ placeOutliers();
+ GAME_STATE = 3;
+ }
+ } else if (GAME_STATE == 3) {
+ // generating new outliers
+ if (numRunningTweens == 0) {
GAME_IS_CLICKABLE = true;
+ GAME_STATE = 0;
}
}
+ /*
+ if (LK.ticks % 12 == 0) {
+ //console.log(numRunningTweens);
+ if (numRunningTweens > 0) {
+ GAME_IS_CLICKABLE = false;
+ } else {
+ GAME_IS_CLICKABLE = true;
+ }
+ }*/
};
\ No newline at end of file
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.