「トーク:Tournament」の版間の差分

編集の要約なし
早速あきらめの境地
1行目: 1行目:
local p = {}
local p = {}
local wBorder = '4px solid red'
local lBorder = '2px solid gray'
function td2(x, round)
local t = {}
local z
if x.z == 0 then
z = lBorder
else
z = wBorder
end
t[1] = '<td rowspan="'..x.e..'" colspan="4" style="border-bottom:'..z..'"></td>'
t[2] = '<td rowspan="'..x.f..'" colspan="4"></td>'
return t
end


function p.main(frame)
function p.main(frame)
11行目: 27行目:
team[i] = args[i]
team[i] = args[i]
data[0][i] = {a = 1, b = 1}
data[0][i] = {a = 1, b = 1}
line[2*i-1] = ""
line[2*i] = ""
i = i + 1
i = i + 1
end
end
60行目: 78行目:
end
end
round = round - 1
round = round - 1
local nRound = round
while round > 0 do
row = 0
prev = 1
for curr = 1, #data[round] do
data[round][curr].z = data[round][curr].z or round
if data[round][curr].a == nil then
data[round][prev].z = data[round][curr].z
prev = prev + 1
else
if data[round][curr][2] == ">" then
data[round][curr].x = data[round][curr].z
data[round][curr].y = round - 1
elseif data[round][curr][2] == "<" then
data[round][curr].x = round - 1
data[round][curr].y = data[round][curr].z
else
data[round][curr].x = round - 1
data[round][curr].y = round - 1
end
data[round][prev].z = data[round][curr].x
data[round][prev+1].z = data[round][curr].y
prev = prev + 2
end
round = round - 1
end
end
for round = 1, nRound do
end
return ""
return ""
end
end


return p
return p
ページ「Tournament」に戻る。