User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'sameTypeBubbles.length')' in this line: 'if (sameTypeBubbles.length >= 3) {' Line Number: 125
User prompt
You should be game over if there is not three connected bubbles in the game
User prompt
Test if the game has no possible moves, if so call gameover
User prompt
Add 10 colors in total, make sure they are all bright
User prompt
Change the tint colors to use a color array
User prompt
Only use bright colors for ball types, also save these from an array
User prompt
Add 10 different ball types
User prompt
Add a new method to Game that checks if the top row has an empty space, if so insert a new bubble here.
User prompt
Bubbles added by spawnBubble should fade in
User prompt
Call spawnBubble at bottom of tick
User prompt
Add a method to Game class that adds bubbles to the top row, if no bubbles currently exist there
User prompt
remove self.fillTopRow(bubbles); from pop
User prompt
Move the fillTopRow into the Game class
User prompt
Fix Bug: 'ReferenceError: Can't find variable: gameBoard' in this line: 'gameBoard.addChild(newBubble);' Line Number: 12
User prompt
Call fillTopRow at the bottom of tick
User prompt
Insert a new method in Game that inserts new bubbles in the top row, if there is no bubble there currently
User prompt
After removing bubbles, check if there is free spaces at the top row. If so insert bubbles here
User prompt
Insert new bubbles at the top row, if there is no bubble there
User prompt
Make ball dropping twice as fast
User prompt
Make acceleration faster on balls falling down
User prompt
Make sure the Y can never be larger than target Y
User prompt
Animate y position y accelerating y, until y is equal or larger than the target. Then stop acceleration and set Y to target Y
User prompt
In move calculate where the bubble should be, vs where it is. If the bubble is not where it should be, animate it to where it should be
User prompt
Don't update bubble physical position when moving to a new position in array
User prompt
Move the changes check inside a tick handler
===================================================================
--- original.js
+++ change.js
@@ -121,9 +121,9 @@
for (var i = 0; i < bubbles.length; i++) {
for (var j = 0; j < bubbles[i].length; j++) {
if (bubbles[i][j]) {
var sameTypeBubbles = bubbles[i][j].pop();
- if (sameTypeBubbles.length >= 3) {
+ if (sameTypeBubbles && sameTypeBubbles.length >= 3) {
hasMoves = true;
break;
}
}