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
User prompt
Add a colors array to block, which has 10 colors matching the full rainbow. Pastel colors
Code edit (2 edits merged)
Please save this source code
User prompt
Add a new cell class that can have two state, filled and not filled.
Code edit (1 edits merged)
Please save this source code
User prompt
Write the moveTowardsHomePosition method that moves the blocks toward their starting position
Code edit (4 edits merged)
Please save this source code
User prompt
Write the code in moveHome on block that animates the block back to it's starting position
Code edit (17 edits merged)
Please save this source code
User prompt
When you stop dragging a tile return it to it's start position
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (4 edits merged)
Please save this source code
User prompt
When creating cells in board make sure the cells are put into the right position in this.grid
User prompt
Fix Bug: 'ReferenceError: Can't find variable: startY' in this line: 'var cell = board.grid && board.grid[startY + i] && board.grid[startY + i][startX + j];' Line Number: 59
User prompt
rather than referring to self.parent.grid refer to board.grid
User prompt
In block remove the shape argument and replace it with a board agument
User prompt
when creating a block pass along the board instance to the creator
User prompt
Make sure blocks is initialized as a 10x10 grid
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'self.parent.grid[startY + i]')' in this line: 'var cell = self.parent.grid[startY + i] && self.parent.grid[startY + i][startX + j];' Line Number: 75
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'self.parent.grid[startY + i]')' in this line: 'var cell = self.parent.grid[startY + i] && self.parent.grid[startY + i][startX + j];' Line Number: 75
User prompt
When dragging a block above the board, calculate which block blocks overlap cells in the board. And set those sell colors to red by tinting them red
User prompt
When dragging a block above the board, calculate which block blocks overlap cells in the board. And set those sell colors to red by tinting them red
===================================================================
--- original.js
+++ change.js
@@ -1,5 +1,5 @@
-var Block = Container.expand(function (shape) {
+var Block = Container.expand(function (board) {
var self = Container.call(this);
var ShapeTypes = {
SINGLE: [[1]],
DOUBLE: [[1, 1]],
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.