User prompt
Add 3 blocks at the bottom of the game
User prompt
Move down board by 30px
User prompt
Fix Bug: 'ReferenceError: Can't find variable: blocks' in this line: 'for (var a = blocks.length - 1; a >= 0; a--) {' Line Number: 56
User prompt
Add a blocks container to game
User prompt
Remove the boardGraphics, we don't need that
User prompt
Add two more block shapes
User prompt
Add the block shapes from 1010
User prompt
Update the block class to choose a block shape and create that shape inside itself using multiple block elements.
User prompt
The board has a 10x10 grid that can be filled up by blocks, please add a 2d array to handle this
User prompt
Move up board by 250px
User prompt
Remove down and up handlers
User prompt
Compensate for the fact that cells have centered anchor points when positing them on the board
User prompt
Make a temporary cell to be used to measure width and hight of cells
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'cell.width')' in this line: 'var totalWidth = 10 * cell.width;' Line Number: 11
User prompt
When configuring the background grid, align cells such that they are center aligned. E.g. start at negative x,y and end at the same positive x,y
User prompt
The board should have a 10x10 background grid
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'blocks[a].move')' in this line: 'blocks[a].move();' Line Number: 32
Initial prompt
1010
===================================================================
--- original.js
+++ change.js
@@ -1,8 +1,7 @@
var Block = Container.expand(function (shape) {
var self = Container.call(this);
- self.shapes = [[[1, 1, 1, 1, 1], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]], [[1, 1, 1, 1], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]], [[1, 1, 1], [0, 0, 0], [0, 0, 0]], [[1, 1], [0, 0]], [[1]], [[1, 1, 1, 1], [1, 0, 0, 0], [1, 0, 0, 0], [1, 0, 0, 0]], [[1, 1], [1, 1]], [[1, 0, 0], [1, 1, 1], [0, 0, 1]], [[0, 1, 0], [1, 1, 1], [0, 1, 0]], [[0, 1, 0], [1, 1, 1]], [[1, 0], [1, 1], [0, 1]]];
- self.shape = self.shapes[Math.floor(Math.random() * self.shapes.length)];
+ self.shape = shape || [[1], [1, 1], [1, 1, 1]];
self.blocks = [];
for (var i = 0; i < self.shape.length; i++) {
for (var j = 0; j < self.shape[i].length; j++) {
if (self.shape[i][j] === 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.