crosstable.love/0010-score

9 lines
190 B
Plaintext

score = function(t, team)
local result = 0
for opp, score in pairs(t[team]) do
if opp ~= 'count' and type(score) == 'number' then
result = result + score
end
end
return result
end