Code edit (1 edits merged)
Please save this source code
User prompt
create cells in reverse order in the y direction
User prompt
set flash effect on game over to pure white
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Set highscore font to impact, and add a black drop shadow
Code edit (12 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: Can't find variable: block' in this line: 'tilesBackground.y = 2732 - block.height / 2 - 30;' Line Number: 213
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
In don't use the blocks position, simply compare board.grid and block.shape to see if a block with the given shape fits anywhere on board.grid
Code edit (7 edits merged)
Please save this source code
User prompt
self.isMovePossible does not seem to work correctly, do not use getOverlappingCells
User prompt
Add a method to game that detects if any move is possible. E.g. if any of the current blocks can currently be dropped anywhere on the board
Code edit (1 edits merged)
Please save this source code
User prompt
Update the colors to still be a rainbow but with more saturation and more saturated
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: self.checkLines is not a function. (In 'self.checkLines()', 'self.checkLines' is undefined)' in this line: 'self.checkLines();' Line Number: 201
Code edit (10 edits merged)
Please save this source code
User prompt
Add board code that detects if a row or column has all cells filled
Code edit (1 edits merged)
Please save this source code
User prompt
After calling dragTarget.destroy, call self.createBlocks if blocks contain no blocks
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: dragTarget.destory is not a function. (In 'dragTarget.destory()', 'dragTarget.destory' is undefined)' in this line: 'dragTarget.destory();' Line Number: 188
Code edit (14 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -1,9 +1,8 @@
var Cell = Container.expand(function () {
var self = Container.call(this);
self.filled = false;
var empty = self.createAsset('cell', 'Filled with a cell (empty)', .5, .5);
- empty.alpha = .3;
var filled = self.createAsset('block', 'Filled with a block', .5, .5);
self.setFill = function (isFilled) {
self.filled = isFilled;
empty.visible = !self.filled;
@@ -106,9 +105,9 @@
var cells = self.getOverlappingCells();
if (cells) {
for (var a = 0; a < cells.length; a++) {
var cell = cells[a];
- cell.setTint(0xff0000);
+ cell.setTint(self.color);
}
}
};
self.rotateShapeRandomly = function () {
@@ -140,16 +139,25 @@
}
}
}
};
- self.checkLines = function () {};
- self.placeBlock = function () {};
- self.tintCell = function (x, y) {
- var cell = self.grid[y] && self.grid[y][x];
- if (cell) {
- cell.tint = 0xff0000;
+ self.checkLines = function () {
+ for (var i = 0; i < 10; i++) {
+ var rowFilled = true;
+ var colFilled = true;
+ for (var j = 0; j < 10; j++) {
+ if (!self.grid[i][j].filled) rowFilled = false;
+ if (!self.grid[j][i].filled) colFilled = false;
+ }
+ if (rowFilled || colFilled) {
+ for (var j = 0; j < 10; j++) {
+ if (rowFilled) self.grid[i][j].setFill(false);
+ if (colFilled) self.grid[j][i].setFill(false);
+ }
+ }
}
};
+ self.placeBlock = function () {};
});
var Game = Container.expand(function () {
var self = Container.call(this);
var blocks = [];
White square with round corners, flat shaded, hyper casual game. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
White square with tight round corners, flat shaded, hyper casual game. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Background for relaxing puzzle game. Pastel colors, flat shaded, vector art. Flowers. Blocks. Relaxing. Clouds Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
White particle cloud. Cartoon. Bright outline. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.