mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-12-23 14:09:02 -06:00
19 lines
376 B
Lua
19 lines
376 B
Lua
|
local Randomizer = require 'tetris.randomizers.randomizer'
|
||
|
|
||
|
local AlwaysRandomizer = Randomizer:extend()
|
||
|
|
||
|
function AlwaysRandomizer:new(piece)
|
||
|
self.piece = piece
|
||
|
self:initialize()
|
||
|
self.next_queue = {}
|
||
|
for i = 1, 30 do
|
||
|
table.insert(self.next_queue, self:generatePiece())
|
||
|
end
|
||
|
end
|
||
|
|
||
|
function AlwaysRandomizer:generatePiece()
|
||
|
return self.piece
|
||
|
end
|
||
|
|
||
|
return AlwaysRandomizer
|