Module:Exercises/Game Links 1

local p = {}

function p.Main(frame) return p.main(frame:getParent.args) end

function p.main(args) local game = args[1] local fullTitle -- This needs to be declared here due to lexical scoping if game == "The Legend of Zelda" then fullTitle = "The Legend of Zelda" elseif game == "The Adventure of Link" then fullTitle = "Zelda II: The Adventure of Link" else fullTitle = "The Legend of Zelda: " .. game end local link = string.format("%s", fullTitle, game) return "*" .. link end

return p