First bundled release.

This commit is contained in:
Joe Z
2019-05-22 23:57:34 -04:00
commit c973929e0c
120 changed files with 8709 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
local Randomizer = require 'tetris.randomizers.randomizer'
local Bag7Randomizer = Randomizer:extend()
function Bag7Randomizer:initialize()
self.bag = {"I", "J", "L", "O", "S", "T", "Z"}
end
function Bag7Randomizer:generatePiece()
if next(self.bag) == nil then
self.bag = {"I", "J", "L", "O", "S", "T", "Z"}
end
local x = math.random(table.getn(self.bag))
return table.remove(self.bag, x)
end
return Bag7Randomizer