From 0b6f62d50e0b379f89fd74f1e4954b436d82dda8 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Mon, 25 Jan 2021 16:34:22 -0500 Subject: [PATCH] Applied a fix for locking big pieces out of the grid --- tetris/components/grid.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tetris/components/grid.lua b/tetris/components/grid.lua index d6c81da..12936fd 100644 --- a/tetris/components/grid.lua +++ b/tetris/components/grid.lua @@ -201,7 +201,7 @@ function Grid:applyBigPiece(piece) y = piece.position.y + offset.y for a = 1, 2 do for b = 1, 2 do - if y*2+a > 0 then + if y*2+a > 0 and y*2 < self.height then self.grid[y*2+a][x*2+b] = { skin = piece.skin, colour = piece.colour