From d22a5d821c9cc8db11632d88cb31104fee1761fc Mon Sep 17 00:00:00 2001 From: Rin Date: Sat, 21 Aug 2021 20:22:45 +0100 Subject: [PATCH] Fixes --- tetris/modes/duality_a1.lua | 4 ++-- tetris/modes/marathon_c99.lua | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tetris/modes/duality_a1.lua b/tetris/modes/duality_a1.lua index 701afb1..451c738 100644 --- a/tetris/modes/duality_a1.lua +++ b/tetris/modes/duality_a1.lua @@ -8,8 +8,8 @@ DualityA1Game.name = "Duality A1" DualityA1Game.hash = "DualityA1" DualityA1Game.tagline = "Control two boards at once!" -function DualityA1Game:new() - DualityA1Game.super:new() +function DualityA1Game:new(c) + DualityA1Game.super:new(c) self.randomizer = SplitHistoryRandomizer() self.other_grid = Grid(10, 24) self.next_queue_length = 2 diff --git a/tetris/modes/marathon_c99.lua b/tetris/modes/marathon_c99.lua index 1a9b063..ad45ce6 100644 --- a/tetris/modes/marathon_c99.lua +++ b/tetris/modes/marathon_c99.lua @@ -159,10 +159,11 @@ function MarathonC99Game:advanceOneFrame(inputs, ruleset) self.frames = self.frames + 1 end if self.piece ~= nil then + local lo = self.piece.last_orientation or self.piece.rotation if not ( - self.piece.rotation - self.piece.last_orientation == -1 or -- 3 >> 2, 2 >> 1, 1 >> 0 - self.piece.rotation - self.piece.last_orientation == 3 or -- 0 >> 3 - self.piece.rotation - self.piece.last_orientation == 0 -- not rotated + self.piece.rotation - lo == -1 or -- 3 >> 2, 2 >> 1, 1 >> 0 + self.piece.rotation - lo == 3 or -- 0 >> 3 + self.piece.rotation - lo == 0 -- not rotated ) then self.ccw_bonus = 0 end