User prompt
change button logic so it runs when pressed and then stops when pressed again
Code edit (7 edits merged)
Please save this source code
User prompt
Add button to bottom strip that will trigger a tick loop that runs checklines twice a second while button pressed. stop loop running when button released
User prompt
in changesfound variable set to run checklines again. remove score update from changes found code
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: board.removeTint is not a function' in this line: 'board.removeTint();' Line Number: 374
User prompt
Fix Bug: 'TypeError: board.removeTint is not a function' in this line: 'board.removeTint();' Line Number: 348
User prompt
remove removeTint function
Code edit (7 edits merged)
Please save this source code
User prompt
remove show overlap
User prompt
Fix Bug: 'Uncaught ReferenceError: hsvToRgb is not defined' in this line: 'self.color = hsvToRgb(hue, 0.6, 1);' Line Number: 108
User prompt
clean up code
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Uncaught ReferenceError: scoreTxt is not defined' in this line: 'LK.gui.topCenter.addChild(scoreTxt);' Line Number: 409
User prompt
Fix Bug: 'Uncaught ReferenceError: scoreTxt is not defined' in this line: 'scoreTxt.anchor.set(.5, 0);' Line Number: 408
User prompt
To ensure the score is updated visually on the screen, the text of the `scoreTxt` object should be updated every time the score changes. This could be done by creating a function within the `Game` class that updates the `scoreTxt` text whenever `LK.setScore` is called, or by directly updating the `scoreTxt` text within the `tick` method of the `Board` class after `LK.setScore` is called.
User prompt
Fix Bug: 'TypeError: LK.trigger is not a function' in this line: 'LK.trigger('scoreUpdated', filledCellsCount);' Line Number: 312
User prompt
add a call to update the text of the `scoreTxt` object within the `Game` class to reflect this new score.
User prompt
change score text to a count of filled cells
User prompt
Add in to game tick a routine that runs checklines until no changes found
User prompt
change checklines code so it follows the following rules: Any filled cell with few than two neighbors becomes empty. Any filled cell two or three neighbours remains. Any filled cell with more than 3 neighbors becomes empty. Any empty cell with exactly 3 filled neighbors becomes a filled cell (add a random block asset to filled cell)
Code edit (6 edits merged)
Please save this source code
User prompt
add alpha to bottom strip
Code edit (1 edits merged)
Please save this source code
Code edit (10 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -308,13 +308,17 @@
}
}
}
LK.setScore(filledCellsCount);
+ self.parent.updateScoreText(filledCellsCount);
};
self.placeBlock = function () {};
});
var Game = Container.expand(function () {
var self = Container.call(this);
+ Game.prototype.updateScoreText = function (score) {
+ this.scoreTxt.setText(score.toString());
+ };
var gameBackground = self.createAsset('gameBackground', 'Background Graphics', .5, .5);
gameBackground.x = 2048 / 2;
gameBackground.y = 2732 / 2 + 65;
var boardBackground = self.createAsset('boardBackground', 'Board Background Graphics', 0.5, 0.5);
@@ -393,9 +397,9 @@
}
};
var score = 0;
self.createBlocks();
- var scoreTxt = new Text2('0', {
+ self.scoreTxt = new Text2('0', {
size: 150,
fill: "#ffffff",
font: 'Impact',
stroke: '#2a636e',
remove painted bits
a yellow furry cuddly ball of fur. little feet. No ears. cute happy face. Cartoon style. Cute art style. Simple vector style. Pastel colors, flat shaded, vector art. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
remove painted bits
a purple furry cuddly ball of fur. little feet. No ears. cute happy face. Cartoon style. Cute art style. Simple vector style. Pastel colors, flat shaded, vector art. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
a colbalt blue furry cuddly ball of fur. little feet. No ears. cute happy face. Cartoon style. Cute art style. Simple vector style. Pastel colors, flat shaded, vector art. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
Light gray square with round corners, With play symbol in middle. flat shaded, hyper casual game. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
high definition, with lots of soft colorful fluffy fur balls. happy cartoon faces. exploding from middle of screen. No words
Light gray square, With a re-start symbol in middle.black boderline around outerend of button. flat shaded, hyper-casual game. 2D. Blank background. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.