Module:Sandbox/Simonlc/Playfield

From TetrisWiki
Revision as of 00:26, 22 November 2020 by Simonlc (talk | contribs)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Sandbox/Simonlc/Playfield/doc

local imgRoot = "/images/";
local graphicTable = {
    [" "] = "1/18/Tet.png", -- Blank
    ["."] = "1/18/Tet.png",

    -- Pieces
    ["T"] = "2/20/TTet.png",
    ["I"] = "1/19/ITet.png",
    ["O"] = "2/20/OTet.png",
    ["Z"] = "c/c6/ZTet.png",
    ["S"] = "b/bc/STet.png",
    ["L"] = "5/51/LTet.png",
    ["J"] = "8/85/JTet.png",
    ["G"] = "8/88/GTet.png", -- garbage

    -- Line clear effect
    ["-"] = "3/38/-Tet.png",

    ["X"] = "0/04/XTet.png",
    ["B"] = "6/6d/BTet.png",
    ["C"] = "4/42/CTet.png",
    ["P"] = "9/9a/PTet.png",

    ["1"] = "9/9f/1Tet.png",
    ["2"] = "4/4f/2Tet.png",
    ["3"] = "0/08/3Tet.png",
    ["4"] = "0/0d/4Tet.png",
    ["5"] = "9/93/5Tet.png",
    ["6"] = "e/e7/6Tet.png",
    ["7"] = "c/cd/7Tet.png",
    ["8"] = "e/e6/8Tet.png",
    ["9"] = "c/c8/9Tet.png",
};


local p = {}
function p.main(frame)
	local playfield = frame.args[#frame.args]
    return playfield
end
return p