User prompt
don't call grid[i] = []; bgGrid[i] = []; during initialization
Code edit (4 edits merged)
Please save this source code
User prompt
grid and bgGrid should both be initialized as empty arrays of 5x5
Code edit (1 edits merged)
Please save this source code
User prompt
in canPlaceTile don't test for null, just use a ! operator
Code edit (1 edits merged)
Please save this source code
User prompt
remove the self=container.. call above self.canPlaceTile
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'self')' in this line: 'self.canPlaceAnyTile = function () {' Line Number: 142
User prompt
Add a new method to game, which tests if we can place any of the current tiles on the board. use the canPlaceTile function to calculate this
User prompt
create a game over method that loops the grid for each tile, using canPlaceTile.
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'self')' in this line: 'self.canPlaceTile = function (tile, gridX, gridY) {' Line Number: 142
User prompt
Add a method to game, that tests if a given tile, can be placed as x,y on the grid, by comparing the grid at that position to the tiles structure
User prompt
Add a game over method to game, you are game over if no tile fits on the grid. Use the tile structure to determine this.
User prompt
in tile, also create a property that is a 2d array that represents the tile. For a tile type where two cells are next to each other set value to [[1,1]] for tiles where two tiles are above and below each other set value to [[1],[1]] for single cell value to [[1]]
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'self')' in this line: 'self.canAddTileToBoard = function (tile) {' Line Number: 131
User prompt
add a method to game, that tests if a given tile can be added anywhere to the board. Consider the type of the tile when doing this
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'self')' in this line: 'self.canAddTileToBoard = function (tile) {' Line Number: 131
User prompt
add a method to game, that tests if a given tile can be added to the board. Consider the type of the tile when doing this
User prompt
when calling addBottomTiles, create the tile outside the screen at the bottom, then animate to the position where the tiles currently spawn
User prompt
in stage up, when destroying a tile, test if the game has no tiles left, if so, insert 3 new tiles
User prompt
in addBottomTiles, use fixed index to insert tiles into bottomTiles
User prompt
in stage up, also remove the draggedTile from bottomTiles when destroying it
User prompt
in stage up, also add the cells who where added to grid container to the totest array
User prompt
add a toTest array to game
User prompt
in stage up, instead of removing cells attach them to the grid container
===================================================================
--- original.js
+++ change.js
@@ -368,8 +368,9 @@
draggedTile.destroy();
if (bottomTiles.length === 0) {
self.addBottomTiles();
}
+ console.log(self.canPlaceAnyTile());
draggedTile = null;
}
}
draggedTile = null;
Simple White square round corners. Vector. No details. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Hour hand. Vector. Simple Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Simple Awesome background for clock chain reaction game. Vector high contrast.