Module:ScoreboardTabVariablesClass

local Class = require('Module:Class').Class local util_args = require('Module:ArgsUtil') local SetVariables = require('Module:SetVariablesClass')

local p = Class(SetVariables)

function p:new self:super('SetVariables') end

function p:set(args) if not args[1] then return end self:_set('tab', args[1]:gsub('_', ' ')) self:_set('index', 0) end

function p:match(gameIndex) local last = self:_get('index') if not last then return nil end if tonumber(gameIndex) ~= 1 then return last end local next = tonumber(last) + 1 self:_set('index', next) return next end

return p