Code edit (4 edits merged)
Please save this source code
User prompt
Write this method //Method that gets all bubbles which are not, or do not have a recursive neighbour that is connected to the top row of bubblels self.getDetachedBubbles = function () {};
Code edit (5 edits merged)
Please save this source code
User prompt
Implement this //Get a list of bubbles that are not connected to the top row, or to a chain of bubbles connected to the top row. self.getDetachedBubbles = function () {}; Note that all unconnected bubbles must be detected
Code edit (1 edits merged)
Please save this source code
User prompt
getDetachedBubbles does not seem to detect all unconnected bubbles, please fix this
User prompt
Implement this //Get a list of bubbles that are not connected to the top row, or to a chain of bubbles connected to the top row. self.getDetachedBubbles = function () {}; Note that all unconnected bubbles must be detected
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'var visited = new Set(connectedToTop);' Line Number: 98
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'return bubble !== undefined;' Line Number: 99
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'return bubble !== null;' Line Number: 99
User prompt
In var visited = new Set(connectedToTop.filter(function (bubble) { return bubble != null; })); LK does not support Set, please fix this
User prompt
Please fix the bug: 'Script error.' in or related to this line: 'if (bubble !== null && !visited.has(bubble)) {' Line Number: 105
Code edit (5 edits merged)
Please save this source code
User prompt
in getDetachedBubbles you are using getConnectedBubbles however that is type dependent, for this case any type should count as connected.
Code edit (5 edits merged)
Please save this source code
User prompt
rewrite getDetachedBubbles such that it counts from the last element in rows not the first
Code edit (18 edits merged)
Please save this source code
Code edit (25 edits merged)
Please save this source code
Code edit (25 edits merged)
Please save this source code
Code edit (17 edits merged)
Please save this source code
User prompt
in bubble update, if not attached, if a bubble intersects with a barrier and the bubble is moving towards the barrier. Bounce the bubble off the barrier
Code edit (3 edits merged)
Please save this source code
User prompt
in bible update, update the intersection logic to assume the barriers is a rectangle and the balls is a circle
User prompt
the modification of speedX and speedY should be based on rectangle to circle intersection and the out angle after intersection should be calculated accordingly
===================================================================
--- original.js
+++ change.js
@@ -89,9 +89,9 @@
}
}
// Mark all bubbles as visited or not
var visited = new Set(connectedToTop.filter(function (bubble) {
- return bubble !== null;
+ return bubble != null;
}));
// Find all bubbles that are not visited and not connected to the top
for (var row = 1; row < rows.length; row++) {
for (var col = 0; col < rows[row].length; col++) {
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.