From dafc11303861426188d3199890a26e861cfc0764 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Fri, 20 Aug 2021 18:53:07 -0400 Subject: [PATCH 1/2] Fixed spawn positions on larger than 10w boards --- tetris/rulesets/ruleset.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tetris/rulesets/ruleset.lua b/tetris/rulesets/ruleset.lua index eeb92db..1406a4b 100644 --- a/tetris/rulesets/ruleset.lua +++ b/tetris/rulesets/ruleset.lua @@ -214,7 +214,7 @@ function Ruleset:initializePiece( colours = self.colourscheme end - local spawn_x = math.floor(spawn_positions[data.shape].x * grid.width / 10) + local spawn_x = math.ceil(spawn_positions[data.shape].x * grid.width / 10) local spawn_dy if (config.gamesettings.spawn_positions == 1) then From 6cf6568a575e4ac52f15fb603887f90d6f440ece Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Fri, 20 Aug 2021 19:09:50 -0400 Subject: [PATCH 2/2] Revert "Fixed spawn positions on larger than 10w boards" This reverts commit dafc11303861426188d3199890a26e861cfc0764. This didn't actually fix the problem, so it's been reverted. --- tetris/rulesets/ruleset.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tetris/rulesets/ruleset.lua b/tetris/rulesets/ruleset.lua index 1406a4b..eeb92db 100644 --- a/tetris/rulesets/ruleset.lua +++ b/tetris/rulesets/ruleset.lua @@ -214,7 +214,7 @@ function Ruleset:initializePiece( colours = self.colourscheme end - local spawn_x = math.ceil(spawn_positions[data.shape].x * grid.width / 10) + local spawn_x = math.floor(spawn_positions[data.shape].x * grid.width / 10) local spawn_dy if (config.gamesettings.spawn_positions == 1) then