From f13e2096b2291535d6b4816e2b834626595a9b58 Mon Sep 17 00:00:00 2001 From: Ishaan Bhardwaj Date: Tue, 6 Oct 2020 15:49:06 -0400 Subject: [PATCH] More randomizer fixes? --- tetris/modes/gamemode.lua | 2 +- tetris/randomizers/bag5alt.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index e305efe..565a41b 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -52,7 +52,7 @@ end function GameMode:initialize() -- after all the variables are initialized, run initialization procedures - for i = 1, 30 do + for i = 1, self.next_queue_length do table.insert(self.next_queue, self:getNextPiece(ruleset)) end end diff --git a/tetris/randomizers/bag5alt.lua b/tetris/randomizers/bag5alt.lua index e67f426..90cd16e 100755 --- a/tetris/randomizers/bag5alt.lua +++ b/tetris/randomizers/bag5alt.lua @@ -4,7 +4,7 @@ local Bag5AltRandomizer = Randomizer:extend() function Bag5AltRandomizer:initialize() self.bag = {"I", "J", "L", "O", "T"} - self.prev = "O" + self.prev = nil end function Bag5AltRandomizer:generatePiece()