21 lines
769 B
Luau
21 lines
769 B
Luau
--!strict
|
|
local Results = {}
|
|
|
|
function Results.clockPrecise(t: number): string
|
|
return string.format("%d:%05.2f", math.floor(t / 60), t % 60)
|
|
end
|
|
|
|
function Results.rows(times: {[string]: any}, total: number): {string}
|
|
local rows = {}
|
|
for i = 1, total do
|
|
local b, o = times["BlueTime" .. i], times["OrangeTime" .. i]
|
|
rows[i] = string.format("Рубеж %d · Синие %s · Оранжевые %s", i,
|
|
if typeof(b) == "number" then Results.clockPrecise(b) else "—",
|
|
if typeof(o) == "number" then Results.clockPrecise(o) else "—")
|
|
end
|
|
return rows
|
|
end
|
|
|
|
Results.tiebreak = "При равенстве рубежей побеждает команда, быстрее дошедшая до последнего взятого."
|
|
return table.freeze(Results)
|