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
Code edit (1 edits merged)
Please save this source code
User prompt
before calling showGameOver flash screen white
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (23 edits merged)
Please save this source code
User prompt
implement //Loop over rows, if a row only has empty values in it, remove it.
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'game.addChildAt(currentBubble, particleInjectionZIndex);' Line Number: 555
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'currentBubble = hintBubbles[hintBubbleOffset] = new HintBubble();' Line Number: 554
Code edit (10 edits merged)
Please save this source code
User prompt
implement self.printRowsToConsole = function () { //Prints nice representation of the rows grid to console as a string };
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (14 edits merged)
Please save this source code
User prompt
We have the pixel offsets for the bubbles around offsetPositions, however we also want to offset in terms of offset in the rows / columns grid. Can you add that as rx: and ry:
User prompt
Add row / column offsets to offsetPositions
User prompt
implement //Loop trough the offsetPositions and find the one that bubble is closest to
Code edit (4 edits merged)
Please save this source code
User prompt
implement //Calculate the position of potential neighbour bubbles into a list here
===================================================================
--- original.js
+++ change.js
@@ -296,10 +296,8 @@
var intersectedBubblePos = self.findBubbleRowAndColumn(intersectedBubble);
var rowOffset = intersectedBubblePos.row % 2 === 0 ? 0 : intersectedBubble.width / 2;
var offsetPositions = [{
x: intersectedBubble.x - intersectedBubble.width / 2 + rowOffset,
- rx: -1,
- ry: -1,
y: intersectedBubble.y - 1.7320508076 * intersectedBubble.height / 2
}, {
x: intersectedBubble.x + intersectedBubble.width / 2 + rowOffset,
y: intersectedBubble.y - 1.7320508076 * intersectedBubble.height / 2
@@ -315,21 +313,21 @@
}, {
x: intersectedBubble.x - intersectedBubble.width + rowOffset,
y: intersectedBubble.y
}];
- var closestPosition = offsetPositions[0];
+ var closestPosition = 0;
var closestDistance = Math.sqrt(Math.pow(closestPosition.x - bubble.x, 2) + Math.pow(closestPosition.y - bubble.y, 2));
for (var i = 1; i < offsetPositions.length; i++) {
var currentPosition = offsetPositions[i];
var currentDistance = Math.sqrt(Math.pow(currentPosition.x - bubble.x, 2) + Math.pow(currentPosition.y - bubble.y, 2));
if (currentDistance < closestDistance) {
closestDistance = currentDistance;
- closestPosition = currentPosition;
+ closestPosition = i;
}
}
// Attach bubble to the closest position
- bubble.x = closestPosition.x;
- bubble.y = closestPosition.y;
+ bubble.x = offsetPositions[closestPosition].x;
+ bubble.y = offsetPositions[closestPosition].y;
bubblesInFlight.splice(a--, 1);
} else {
bubble.x = nextX;
bubble.y = nextY;
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.