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
Board should be created before blocks are created
User prompt
Add logic that allows me to drag and drop the blocks crated in Game
User prompt
set alpha on the block background asset to .5
User prompt
In Game, create a method that creates a new block and use that instead when creating blocks
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'block.dragData.getLocalPosition')' in this line: 'block.dragOffsetX = block.dragData.getLocalPosition(block.parent).x - block.x;' Line Number: 76
User prompt
Allow me to drag and drop the blocks created in GAme
User prompt
set blockSize to 160
User prompt
set block size to 170
User prompt
you define var blockSize = 150; twice in block class, remove the second instance
User prompt
Remove the secound definition of blockSize in the block class
User prompt
Only define blockSize once in Block
User prompt
Used a size variable everywhere you use 150 in Block class
User prompt
Fix Bug: 'TypeError: self.rotateShapeRandomly is not a function. (In 'self.rotateShapeRandomly()', 'self.rotateShapeRandomly' is undefined)' in this line: 'self.rotateShapeRandomly();' Line Number: 12
User prompt
After choosing a shape, rotate the shape randomly
User prompt
Instead of adding the shapes to the shape array manually, simply iterate the shape types array and add things directly
User prompt
Also remove CROSS from shapes array
User prompt
Remove the CROSS shape from the game
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'self.shape.length')' in this line: 'for (var i = 0; i < self.shape.length; i++) {' Line Number: 17
User prompt
Delete the CROSS shape from the game
User prompt
Add LSHAPE to shapes
User prompt
Create a new shape type called LSHAPE which is a 3x3 tile, with blocks 3 blocks on the left edge and 3 blocks on the bottom edge, but with all other blocks transparent
User prompt
Create separate definition for shape types in Block, then use those in shapes. This makes it easier to later referee to a specific block that we want to change.
User prompt
Change the block that has the left and bottom edge be 4 blocks large to a block that is only 3c3
User prompt
When creating blocks in Game, add a 30px spacing between the blocks
===================================================================
--- original.js
+++ change.js
@@ -46,13 +46,15 @@
stage.on('move', function (obj) {
if (self.dragging) {
var pos = obj.event.getLocalPosition(self.parent);
self.move(pos.x, pos.y);
+ self.calculateOverlap();
}
});
stage.on('up', function (obj) {
self.dragging = false;
});
+ self.calculateOverlap = function () {};
self.rotateShapeRandomly = function () {
var rotations = Math.floor(Math.random() * 4);
for (var r = 0; r < rotations; r++) {
self.shape = self.shape[0].map((val, index) => self.shape.map(row => row[index]).reverse());
@@ -76,8 +78,9 @@
}
}
self.checkLines = function () {};
self.placeBlock = function () {};
+ self.tintCell = function (x, y) {};
});
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.