User prompt
Remove the current code that increases score. And instead at the top of the inside of if (connectedNeighbors.length > 0) { add 10*connectedNeighbors.length to score
User prompt
before calling resetBoard in tick, increment how many cell types the game has by 1
User prompt
Increase how many cell types the game uses each time the board reset by 1 for each call to reset
User prompt
totalCellTypes should only increment once every resetBoard
User prompt
Increase how many cell types the game uses each time the board reset
User prompt
Each time you call resetBoard increment by 1
User prompt
Initialize totalCellTypes with 2
User prompt
In reset board, after attaching node set newCell.y = -100;
Code edit (2 edits merged)
Please save this source code
User prompt
After adding newCell to grid in reset board, set it's y position to -50
User prompt
updateLives crashes if given a negative value. Set lives to max of 0 in the first line of updateLives
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'heart.destroy')' in this line: 'heart.destroy();' Line Number: 22
User prompt
Before calling resetBoard in tick, calculate the amount of tiles left on the board and subtract that from lives. If lives are less than zero. call game over
User prompt
move down LifeIndicator by 30px
User prompt
Move down LifeIndicator by 30px
User prompt
Move down LifeIndicator by 180px
User prompt
in score text use weight not fontWeight
User prompt
Set score indicator weight:800 and add drop shadow
User prompt
Set score indicator width:800 and add black drop shadow
User prompt
When calculating totalWidth subtract one from self.lives
Code edit (1 edits merged)
Please save this source code
User prompt
assume start x in lifeIndicator is -totalWidth/2
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'heart.width')' in this line: 'var totalWidth = self.lives * (heart.width + 10) - 10;' Line Number: 9
User prompt
In LifeIndicator calculate x position such that lives are centered in the element
===================================================================
--- original.js
+++ change.js
@@ -230,13 +230,12 @@
self.attachCellListeners = function (cell) {
cell.on('down', function (obj) {
var connectedNeighbors = self.findConnectedNeighbors(cell);
if (connectedNeighbors.length > 0) {
+ score += 10 * connectedNeighbors.length;
var cellsToDestroy = [cell].concat(connectedNeighbors);
cellsToDestroy.forEach(function (cell) {
self.deleteCell(cell);
- score += 10 * cellsToDestroy.length;
- scoreText.setText(score.toString());
});
self.moveToEmptySpace('down', false);
self.moveToEmptySpace('left', true);
}
Cartoon Christmas decoration Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas candy cane Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas stocking Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas yellow starr Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas ornament Blue Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas snow flake. Blue Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas outdoor scene. Forest, northern lights. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
White square. Narrow round corners. Background element. Flat. Vector. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas heart Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Simple Cartoon Christmas particle. White. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas ornament yellow and purple Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon Christmas snow man head. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Simple Cartoon Christmas wreath. Purple Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.