Fix bug where Game Over appears when clicking left or right before a block falls into view.
Recreate the problem by tapping the left or right button immediately after a block has just been placed and a new created. If the newly created piece is above the top of the grid and it is moved off the left or right side the game registers a game over.
A good place to start is gameReducer.js. Anytime a block is moved the reducer calls the canMoveTo() method from utils/index.js. This method takes shape, grid, x, y, rotation parameters and checks to see if the block could be moved to these values.
Fix bug where Game Over appears when clicking left or right before a block falls into view.
Recreate the problem by tapping the left or right button immediately after a block has just been placed and a new created. If the newly created piece is above the top of the grid and it is moved off the left or right side the game registers a game over.
A good place to start is
gameReducer.js
. Anytime a block is moved the reducer calls thecanMoveTo()
method fromutils/index.js
. This method takesshape, grid, x, y, rotation
parameters and checks to see if the block could be moved to these values.