Module:Sports table/Chess: Difference between revisions

Content deleted Content added
bgcolor
No edit summary
Line 30:
local game_count = 1
while match_str ~= '' do
local gii = mw.ustring.match(match_str, '^%s*([^%+%s]*)%s*%+?')
local bgcolii = mw.ustring.match(bgcol_str, '^%s*([^%+%s]*)%s*%+?')
if gii == '1' then
Args['win_'..ti] = Args['win_'..ti] + 1
Line 46:
Args['bgcol' .. game_count .. '_' .. ti .. '_' .. tj] = bgcolii
end
bgcol_str = mw.ustring.gsub(bgcol_str, '^%s*([^%+%s]*)%s*%+?', '') or ''
match_str = mw.ustring.gsub(match_str, '^%s*([^%+%s]*)%s*', '') or '' -- Remove gii from the match_str
if match_str ~= '' then -- If there is still a plus sign
game_count = game_count + 1 -- Then there is another game in the match
Line 59:
end
end
Args['legs'] = legs -- And finally change the Arg at the end
-- Which columns to show
local show_rating = yesno(Args['show_rating'] or 'no')