Module:Exp Game

-- This module serves as the code for Template:Exp Game2 local p = {} local utilsGame = require( "Module:UtilsGame" ) local utilsTable = require( "Module:UtilsTable" )

-- Main function called by Template:Exp Game function p.Main( frame ) local games = frame:getParent.args return p.Display(games) end

function p.Display(games) local result = ' ('	-- Remove duplicates to make sure no game appears twice.	local games = utilsTable.unique(games)	games = utilsGame.OrderGames(games, "canon")	-- For every arguments received add a note.	for key, value in pairs(games) do		local fullGame = utilsGame.AbbToGame(value, true)		-- If the game exists add a note.		if fullGame ~= "Unknown" then			-- If the game is the first one, do not add a "|".			if key ~= 1 then				result = result .. ' | '			end			result = result .. ''			result = result .. value .. ' '		end	end	result = result .. ') ' return result end

return p