Break leaderboard ties with Melee's tiebreakers
After total of all sessions, ties fall to OMW%, GW% and OGW% over all the league's matches (bye = 2-0 win, not an opponent; opponents floored at 1/3), then name. Verified identical to Melee's order and percentages on a real night. The leaderboard shows the three percentages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0e14228b8f
commit
a99997b96d
4 files changed
+66
-7
No files matched your search
+5
-2
@@ -1,9 +1,12 @@
|
||||
<%- include('head') %>
|
||||
<h1><%= lg.name %></h1>
|
||||
<h2>Leaderboard <small>(best <%= lg.best_n %> sessions)</small></h2>
|
||||
<table><tr><th>#</th><th>Player</th><th>Counted</th><th>All sessions</th><th>Played</th><th>W-D-L</th></tr>
|
||||
<table><tr><th>#</th><th>Player</th><th>Counted</th><th>All sessions</th><th>Played</th><th>W-D-L</th><th>OMW%</th><th>GW%</th><th>OGW%</th></tr>
|
||||
<% const pct = (r, k) => r.tb ? (r.tb[k] * 100).toFixed(2) : '–' %>
|
||||
<% rows.forEach((r, i) => { %><tr><td><%= i + 1 %></td><td><%= r.name %></td><td><b><%= r.score %></b></td><td><%= r.total %></td>
|
||||
<td><%= r.sessions %></td><td><%= r.rec ? r.rec.join('-') : '–' %></td></tr><% }) %></table>
|
||||
<td><%= r.sessions %></td><td><%= r.rec ? r.rec.join('-') : '–' %></td>
|
||||
<td><%= pct(r, 'omw') %></td><td><%= pct(r, 'gw') %></td><td><%= pct(r, 'ogw') %></td></tr><% }) %></table>
|
||||
<p><small>Ties: total of all sessions, then Melee's tiebreakers (opponents' match-win %, game-win %, opponents' game-win %) over all league matches.</small></p>
|
||||
<h2>Sessions</h2>
|
||||
<ul><% sessions.forEach(g => { %><li><a href="<%= base %>/session/<%= g.id %>">Session <%= g.number %> – <%= g.date %></a></li><% }) %></ul>
|
||||
<% if (admin) { %><form method="post" action="<%= base %>/admin/league/<%= lg.id %>/session"><input type="date" name="date" required> <button>New session</button></form><% } %>
|
||||
|
||||
Reference in new issue
Block a user