Condensed GF

pull/4/head
Ishaan Bhardwaj 2021-01-14 19:23:06 -05:00
parent 9f96afd1a0
commit 80d87db1d2
1 changed files with 1 additions and 22 deletions

View File

@ -19,6 +19,7 @@ function MarathonGFGame:new()
self.message_timer = 0 self.message_timer = 0
self.randomizer = Bag7Randomizer() self.randomizer = Bag7Randomizer()
self.combo = 0 self.combo = 0
self.immobile_spin_bonus = true
self.lock_drop = true self.lock_drop = true
self.lock_hard_drop = true self.lock_hard_drop = true
@ -129,28 +130,6 @@ function MarathonGFGame:updateScore(level, drop_bonus, cleared_lines)
else self.combo = 0 end else self.combo = 0 end
end end
function MarathonGFGame:onAttemptPieceMove(piece)
if self.piece ~= nil then
if not piece:isMoveBlocked(self.grid, { x=-1, y=0 }) and
not piece:isMoveBlocked(self.grid, { x=1, y=0 }) then
piece.spin = false
end
end
end
function MarathonGFGame:onAttemptPieceRotate(piece)
if self.piece ~= nil then
if piece:isDropBlocked(self.grid) and
piece:isMoveBlocked(self.grid, { x=-1, y=0 }) and
piece:isMoveBlocked(self.grid, { x=1, y=0 }) and
piece:isMoveBlocked(self.grid, { x=0, y=-1 }) then
piece.spin = true
else
piece.spin = false
end
end
end
function MarathonGFGame:onPieceLock(piece, cleared_row_count) function MarathonGFGame:onPieceLock(piece, cleared_row_count)
self.super:onPieceLock() self.super:onPieceLock()
if self.grid:checkForBravo(cleared_row_count) then if self.grid:checkForBravo(cleared_row_count) then