diff --git a/funcs.lua b/funcs.lua index 5f5f1c7..7c017ce 100644 --- a/funcs.lua +++ b/funcs.lua @@ -80,9 +80,13 @@ end function table.contains(table, element) for _, value in pairs(table) do - if value == element then - return true - end + if value == element then + return true + end end return false - end \ No newline at end of file +end + +function clamp(a, b, c) + return math.min(a, math.max(b, c)) +end \ No newline at end of file diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index 5c87e67..7e0f67d 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -207,7 +207,7 @@ function GameMode:update(inputs, ruleset) ) then self.das.frames = math.max( self.das.frames - self:getDasCutDelay(), - -self:getDasCutDelay() + -(self:getDasCutDelay() + 1) ) end