Content deleted Content added
No edit summary |
No edit summary |
||
Line 161:
local show_loss = yesno(Args['show_loss'] or 'no')
local show_sb = yesno(Args['show_sb'] or 'no')
local sb_iff_hth = yesno(Args['sb_iff_hth'] or 'no')
local extra_cols = tonumber(Args['extra_cols']) or 0
local disp_fractions = yesno(Args['disp_fractions'] or 'yes')
Line 198 ⟶ 199:
-- Sonneborn-Berger score
if show_sb then
if sb_iff_hth and hth_local == '—' then
local legs = tonumber(Args['legs']) or 1▼
sb_score = '—'
for jj=1,N_teams do▼
end
local tj = Args['team' .. jj]▼
local tjpoints = win_points*Args['win_'..tj] + draw_points*Args['draw_'..tj] + loss_points*Args['loss_'..tj]▼
▲ local legs = tonumber(Args['legs']) or 1
▲ if ii ~= jj then
▲ for jj=1,N_teams do
local match_str = Args['match_' .. team_code_ii .. '_' .. tj] or ''▼
▲ local tj = Args['team' .. jj]
▲ local tjpoints = win_points*Args['win_'..tj] + draw_points*Args['draw_'..tj] + loss_points*Args['loss_'..tj]
local gii = mw.ustring.match(match_str, '^%s*([^%+%s]*)%s*%+?')▼
▲ local match_str = Args['match_' .. team_code_ii .. '_' .. tj] or ''
sb_score = sb_score + win_points*tjpoints▼
▲ local gii = mw.ustring.match(match_str, '^%s*([^%+%s]*)%s*%+?')
sb_score = sb_score + draw_points*tjpoints▼
sb_score = sb_score +
elseif gii == '½' then
elseif gii == '0' then
end
match_str = mw.ustring.gsub(match_str, '^%s*([^%+%s]*)%s*%+?', '') or ''▼
end
▲ match_str = mw.ustring.gsub(match_str, '^%s*([^%+%s]*)%s*%+?', '') or ''
end
end
|