Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (20 edits merged)
Please save this source code
User prompt
Implement self.calculateWarningScoreList = function () {}; which should return 13 warning values based on how many bubbles are getting close to the bottom of the screen. The goal being to show a warning to the user that some balls are getting close to the bottom.
Code edit (1 edits merged)
Please save this source code
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: 'TypeError: null is not an object (evaluating 'bubbleIndex.col')' in or related to this line: 'var newCol = bubbleIndex.col + dir[1];' Line Number: 221
User prompt
Please fix the bug: 'TypeError: null is not an object (evaluating 'bubbleIndex.row')' in or related to this line: 'var newRow = bubbleIndex.row + dir[0];' Line Number: 218
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: null is not an object (evaluating 'bubbleIndex.row')' in or related to this line: 'if (rows[bubbleIndex.row] && rows[bubbleIndex.row].length == 12) {' Line Number: 211
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: null is not an object (evaluating 'bubbleIndex.row')' in or related to this line: 'if (rows[bubbleIndex.row].length == 12) {' Line Number: 211
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: 'TypeError: null is not an object (evaluating 'bubbleIndex.row')' in or related to this line: 'if (rows[bubbleIndex.row].length == 12) {' Line Number: 211
Code edit (10 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: Can't find variable: intersectedBubble' in or related to this line: 'var intersectedBubblePos = self.findBubbleIndex(intersectedBubble);' Line Number: 313
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: 'ReferenceError: Can't find variable: isActive' in or related to this line: 'if (isActive) {' Line Number: 57
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -204,9 +204,11 @@
directions[5] = [1, 1];
}
for (var i = 0; i < directions.length; i++) {
var dir = directions[i];
- var newRow = bubbleIndex.row + dir[0];
+ if (bubbleIndex && rows[bubbleIndex.row]) {
+ var newRow = bubbleIndex.row + dir[0];
+ }
var newCol = bubbleIndex.col + dir[1];
if (newRow >= 0 && newRow < rows.length && newCol >= 0 && newCol < rows[newRow].length) {
neighbors.push(rows[newRow][newCol]);
}
@@ -321,35 +323,35 @@
gameIsStarted = true;
var intersectedBubblePos = self.findBubbleIndex(intersectedBubble);
var colOffset = rows[intersectedBubblePos.row].length == 13 ? 0 : 1;
var offsetPositions = [{
- x: intersectedBubble.x - bubbleSize / 2,
- y: intersectedBubble.y - 1.7320508076 * bubbleSize / 2,
+ x: intersectedBubble.targetX - bubbleSize / 2,
+ y: intersectedBubble.targetY - 1.7320508076 * bubbleSize / 2,
ro: intersectedBubblePos.row + 1,
co: intersectedBubblePos.col - 1 + colOffset
}, {
- x: intersectedBubble.x + bubbleSize / 2,
- y: intersectedBubble.y - 1.7320508076 * bubbleSize / 2,
+ x: intersectedBubble.targetX + bubbleSize / 2,
+ y: intersectedBubble.targetY - 1.7320508076 * bubbleSize / 2,
ro: intersectedBubblePos.row + 1,
co: intersectedBubblePos.col + colOffset
}, {
- x: intersectedBubble.x + bubbleSize,
- y: intersectedBubble.y,
+ x: intersectedBubble.targetX + bubbleSize,
+ y: intersectedBubble.targetY,
ro: intersectedBubblePos.row,
co: intersectedBubblePos.col + 1
}, {
- x: intersectedBubble.x + bubbleSize / 2,
- y: intersectedBubble.y + 1.7320508076 * bubbleSize / 2,
+ x: intersectedBubble.targetX + bubbleSize / 2,
+ y: intersectedBubble.targetY + 1.7320508076 * bubbleSize / 2,
ro: intersectedBubblePos.row - 1,
co: intersectedBubblePos.col + colOffset
}, {
- x: intersectedBubble.x - bubbleSize / 2,
- y: intersectedBubble.y + 1.7320508076 * bubbleSize / 2,
+ x: intersectedBubble.targetX - bubbleSize / 2,
+ y: intersectedBubble.targetY + 1.7320508076 * bubbleSize / 2,
ro: intersectedBubblePos.row - 1,
co: intersectedBubblePos.col - 1 + colOffset
}, {
- x: intersectedBubble.x - bubbleSize,
- y: intersectedBubble.y,
+ x: intersectedBubble.targetX - bubbleSize,
+ y: intersectedBubble.targetY,
ro: intersectedBubblePos.row,
co: intersectedBubblePos.col - 1
}];
var closestPosition = 0;
@@ -572,9 +574,9 @@
/****
* Initialize Game
****/
var game = new LK.Game({
- backgroundColor: 0x010330
+ backgroundColor: 0x0c0d25
});
/****
* Game Code
@@ -593,13 +595,13 @@
[ ] Make sure empty rows are removed from the array
[X] Make sure we GC nodes that drop of screen
[ ] Make preview line fade out at the end
[ ] Add preview bubble
-[ ]
+[ ] Use targetx and y for offset not x,y
*/
var bubbleSize = 150;
var gameIsStarted = false;
-var bubbleColors = [0xff2853, 0x44d31f, 0x28f2f0, 0xb22bff, 0x2413ff, 0xff7c11];
+var bubbleColors = [0xff2853, 0x44d31f, 0x3535ff, 0xcb2bff, 0x28f2f0, 0xffc411];
var barriers = [];
for (var a = 0; a < 4; a++) {
for (var b = 0; b < 3; b++) {
var barrier = game.addChild(new Barrier());
@@ -648,9 +650,9 @@
refreshHintLine();
// }
};
function getMaxTypes() {
- return Math.max(Math.min(Math.floor((LK.getScore() + 100000) / 50000), bubbleColors.length), 6);
+ return Math.max(Math.min(Math.floor((LK.getScore() + 100000) / 50000), bubbleColors.length), 3);
}
function refreshHintLine() {
var ox = hintTargetX - launcher.x;
var oy = hintTargetY - launcher.y;
Circular white gradient circle on black background. Gradient from white on the center to black on the outer edge all around.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Soft straight Long red paint on black background. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Fire ball. Bubble shooter game. Thin black outline.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
green notification bubble. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.