diff options
-rw-r--r-- | src/game.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index 17000a0..47526c8 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -101,7 +101,7 @@ void GameState::render(){ } bool GameState::cellIsEmpty(Point* p){ - return( grid[p->y][p->x] == 0 ); + return( p->x < GRID_WIDTH && p->x >= 0 && grid[p->y][p->x] == 0 ); } void GameState::pressRotate(){} |