Replay system v2

This commit is contained in:
Ishaan Bhardwaj
2021-12-08 20:19:46 -05:00
parent 710f658540
commit 9b41e56135
6 changed files with 131 additions and 83 deletions

View File

@@ -182,6 +182,19 @@ function Grid:clearSpecificRow(row)
end
end
function Grid:clearBlock(x, y)
self.grid[x+1][y+1] = empty
end
function Grid:clearBottomRows(num)
local old_isRowFull = self.isRowFull
self.isRowFull = function(self, row)
return row >= self.height + 1 - num
end
self:clearClearedRows()
self.isRowFull = old_isRowFull
end
function Grid:applyPiece(piece)
if piece.big then
self:applyBigPiece(piece)