User prompt
Update the code inside tick function to recursively test if if any changes happened, until there is no changes. This should still happen inside tick
User prompt
recursively test if something changed in tick, until nothing changes
User prompt
Keep executing removing bubbles until nothing changed on the board
User prompt
Update the tick function to take advantage of the fact that .move() returns true if a bubble was moved
User prompt
Return true on the bubble move method if a bubble was moved
User prompt
Recursive keep checking if bubbles should move down, until no changes where detected
User prompt
When testing if bubbles should move down, loop the array in reverse such that all changes take affect at once
User prompt
Fix Bug: 'TypeError: null is not an object (evaluating 'bubbles[i][j].arrayY')' in this line: 'bubbles[i][j] = null;' Line Number: 94
User prompt
In tick, check if the space below it is free, if so move the bubble to this space updating both the array and the arrayX arrayY variables
User prompt
You are trying to use the y and x position of bubbles as a way to lookup in the bubbles array. The physical position of a bubble has nothing to do with its position in the array. Please fix this
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'Game.bubbles.length')' in this line: 'if (x >= 0 && x < Game.bubbles.length && y >= 0 && y < Game.bubbles[0].length && Game.bubbles[x][y]) {' Line Number: 51
User prompt
In pop and get neighbors use the global bubble array rather than expecting to revive it as a method argument
User prompt
When creating a bubble in game, make sure to pass the bubble array
User prompt
In the bubble constructor accept the bubbels areay
User prompt
When creation an bubble in game,pass bubbels array to the created bubble
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'Game.bubbles.length')' in this line: 'if (x >= 0 && x < Game.bubbles.length && y >= 0 && y < Game.bubbles[0].length && Game.bubbles[x][y]) {' Line Number: 51
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'bubbles.length')' in this line: 'if (x >= 0 && x < bubbles.length && y >= 0 && y < bubbles[0].length && bubbles[x][y]) {' Line Number: 51
User prompt
Fix Bug: 'ReferenceError: Can't find variable: bubbles' in this line: 'this.pop(bubbles);' Line Number: 24
User prompt
If I click a bubble, and that bubble is connected to two or more bubbels of the same type. Remove those bubbels and delete them from the array
User prompt
Bubbels have 5 types, tint the ball based on which type it is. Use bright colors
User prompt
Set x and y to 61 on the board container
User prompt
Set bubble container x and y to 61
User prompt
Set container x and y to 61
User prompt
Add all the bubbels to a single board container
User prompt
Consider that bubbels have their anchor point at the center when spacing the
===================================================================
--- original.js
+++ change.js
@@ -97,12 +97,10 @@
changes = true;
}
if (bubbles[i][j] && !bubbles[i][j].parent) {
bubbles[i][j] = null;
- changes = true;
} else if (bubbles[i][j] && bubbles[i][j].arrayY < bubbles[0].length - 1 && !bubbles[i][j].parent) {
bubbles[i][j] = null;
- changes = true;
}
}
}
}