Fix results display for PAIRGO and RENGO tournaments

For PAIRGO/RENGO, games are team games (w/b are team IDs), not
individual player games. Use pmap (teams map) instead of plmap
(players map) to look up participants.
This commit is contained in:
Claude Brisson
2025-11-30 11:12:32 +01:00
parent 9a379052e5
commit dd95c48f0d

View File

@@ -31,9 +31,14 @@
<tbody>
#set($dispRst = {'?':'?', 'w':'1-0', 'b':'0-1', '=':'½-½', 'X':'X', '#':'1-1', '0':'0-0'})
#set($dispRstInv = {'?':'?', 'w':'0-1', 'b':'1-0', '=':'½-½', 'X':'X', '#':'1-1', '0':'0-0'})
## For PAIRGO/RENGO, games are team games - use pmap (teams). For others, use plmap (players).
#set($resultsMap = $plmap)
#if($tour.type == 'PAIRGO' || $tour.type.startsWith('RENGO'))
#set($resultsMap = $pmap)
#end
#foreach($game in $individualGames)
#set($white = $plmap[$game.w])
#set($black = $plmap[$game.b])
#set($white = $resultsMap[$game.w])
#set($black = $resultsMap[$game.b])
#if($black && $white)
<tr id="result-$game.id" data-id="$game.id">
<td data-sort="$game.t">${game.t}.</td>