mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-12-22 17:59:02 -06:00
Fixed randomiser and next queue whhhackiness
This commit is contained in:
parent
f13e2096b2
commit
8fef7faa6a
@ -50,13 +50,6 @@ function GameMode:new()
|
||||
self.secondary_section_times = { [0] = 0 }
|
||||
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:getDropSpeed() return 1 end
|
||||
function GameMode:getARE() return 25 end
|
||||
|
@ -4,15 +4,10 @@ local Randomizer = Object:extend()
|
||||
|
||||
function Randomizer:new()
|
||||
self:initialize()
|
||||
self.next_queue = {}
|
||||
for i = 1, 30 do
|
||||
table.insert(self.next_queue, self:generatePiece())
|
||||
end
|
||||
end
|
||||
|
||||
function Randomizer:nextPiece()
|
||||
table.insert(self.next_queue, self:generatePiece())
|
||||
return table.remove(self.next_queue, 1)
|
||||
return self:generatePiece()
|
||||
end
|
||||
|
||||
function Randomizer:initialize()
|
||||
|
Loading…
Reference in New Issue
Block a user