Module:Sandbox/B2project/NHL Standings: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 79:
args[currentIdx+5] == nil or
args[currentIdx+6] == nil or
args[currentIdx+7] == nil ) thenor
args[currentIdx+8] == nil or
args[currentIdx+9] == nil ) then
return nil
end
Line 92 ⟶ 94:
goalsfor = tonumber(mw.text.trim(args[currentIdx+6])),
goalsag = tonumber(mw.text.trim(args[currentIdx+7])),
goaldif = tonumber(mw.text.trim(args[currentIdx+8])),
points = tonumber(mw.text.trim(args[currentIdx+9])),
}
returnData.cIndicesRead = 5
Line 101 ⟶ 105:
teamInfo.goalsfor = teamInfo.goalsfor
teamInfo.goalsag = teamInfo.goalsag
teamInfo.goaldif = (teamInfo.goalsfor - teamInfo.goalsag)
teamInfo.points = ((teamInfo.wins*2)+(teamInfo.ties*1)+(teamInfo.OTlosses*1))
return teamInfo
end, -- function readTeamInfo.default()
Line 120 ⟶ 126:
goalsfor= tonumber(mw.text.trim(args[currentIdx+6])),
goalsag= tonumber(mw.text.trim(args[currentIdx+7])),
goaldif = tonumber(mw.text.trim(args[currentIdx+8])),
points = tonumber(mw.text.trim(args[currentIdx+9])),
}
returnData.cIndicesRead = 3
Line 143 ⟶ 151:
! <abbr title="Goals for">GF</abbr>\
! <abbr title="Goals against">GA</abbr>\
! <abbr title="Goal difference">GD</abbr>\
! <abbr title="Points">Pts</abbr>\
'
end, -- function generateTableHeader.default()
Line 155 ⟶ 165:
| style="text-align:left;" | ' .. teamRowInfo.seedText .. '[[' .. teamRowInfo.teamSeasonPage .. '|' .. teamInfo.name .. ']]\
|| ' .. (teamInfo.wins+teamInfo.losses+teamInfo.ties+teamInfo.OTlosses) ..'\
|| ' .. teamInfo.wins .. ' || ' .. teamInfo.losses .. ' || ' ..teamInfo.ties.. ' || ' ..teamInfo.OTlosses.. ' || ' ..teamInfo.tiebr.. ' || ' ..teamInfo.goalsfor.. ' || ' ..teamInfo.goalsag.. ' || ' ..teamInfo.goaldif.. ' || ' ..teamInfo.points.. '\n'
 
end, -- function generateTeamRow.default()