From d8fad3dc37b03a83b9e8bdfdf1890b23b8a7a8f6 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Wed, 11 Nov 2020 22:30:30 -0500 Subject: [PATCH] Added some more developer functions, to aid in building modes. --- tetris/components/grid.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tetris/components/grid.lua b/tetris/components/grid.lua index d1702ed..9f61a61 100644 --- a/tetris/components/grid.lua +++ b/tetris/components/grid.lua @@ -171,6 +171,20 @@ function Grid:applyFourWide() end end +function Grid:applyCeiling(lines) + for row = 1, lines do + for col = 1, 9 do + self.grid[row][col] = block + end + end +end + +function Grid:clearSpecificRow(row) + for col = 1, 10 do + self.grid[row][col] = empty + end +end + function Grid:applyPiece(piece) if piece.big then self:applyBigPiece(piece)