Module:Sandbox/Simonlc/Playfield: Difference between revisions

From TetrisWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 36: Line 36:
local p = {}
local p = {}
function p.main(frame)
function p.main(frame)
local playfield = frame.args[-1]
local playfield = frame.args[1]
     return playfield
     return playfield
end
end
return p
return p

Revision as of 00:29, 22 November 2020

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[1]
    return playfield
end
return p