This commit is contained in:
Ishaan Bhardwaj 2020-10-06 16:29:24 -04:00
commit b983e1c108
2 changed files with 1 additions and 13 deletions

View File

@ -50,13 +50,6 @@ function GameMode:new()
self.secondary_section_times = { [0] = 0 } self.secondary_section_times = { [0] = 0 }
end end
function GameMode:initialize()
-- after all the variables are initialized, run initialization procedures
for i = 1, self.next_queue_length do
table.insert(self.next_queue, self:getNextPiece(ruleset))
end
end
function GameMode:getARR() return 1 end function GameMode:getARR() return 1 end
function GameMode:getDropSpeed() return 1 end function GameMode:getDropSpeed() return 1 end
function GameMode:getARE() return 25 end function GameMode:getARE() return 25 end

View File

@ -4,15 +4,10 @@ local Randomizer = Object:extend()
function Randomizer:new() function Randomizer:new()
self:initialize() self:initialize()
self.next_queue = {}
for i = 1, 30 do
table.insert(self.next_queue, self:generatePiece())
end
end end
function Randomizer:nextPiece() function Randomizer:nextPiece()
table.insert(self.next_queue, self:generatePiece()) return self:generatePiece()
return table.remove(self.next_queue, 1)
end end
function Randomizer:initialize() function Randomizer:initialize()