#macro(rank $rank)#if( $rank<0 )#set( $k = -$rank )${k}k#else#set( $d=$rank+1 )${d}d#end#end #if (!$tour)

Invalid tournament id

#end #set($round = $math.toInteger($!params.round)) #if(!$round) #set($round = 1) #else #set($round = $math.min($math.max($round, 1), $tour.rounds)) #end
#if($tour.type == 'INDIVIDUAL' || $tour.type.startsWith('TEAM')) #set($parts = $api.get("tour/${params.id}/part")) #else #set($parts = $api.get("tour/${params.id}/team")) #end #set($pmap = $utils.toMap($parts)) #set($roundPairing = $api.get("tour/${params.id}/pair/$round")) #if($roundPairing.error) #stop #end #set($games = $utils.removeBye($roundPairing.games)) #set($pages = ($games.size() + 3) / 4) #set($items = $pages * 4) #foreach($i in [1..$items]) #set($j = ($i - 1) / 4 + (($i - 1) % 4) * $pages) #if($j < $games.size()) #set($game = $games[$j]) #set($white = $pmap[$game.w]) #set($black = $pmap[$game.b]) #else #set($game = { 't': 'xxx', 'h': 'xxx' }) #set($white = { 'name': 'xxx', 'firstname': 'xxx', 'rank': -99, 'country': 'XX', 'club': 'xxx' }) #set($black = { 'name': 'xxx', 'firstname': 'xxx', 'rank': -99, 'country': 'XX', 'club': 'xxx' }) #end #if($foreach.index % 4 == 0)
#end
$tour.name
Table $game.t
#set($komi = $tour.komi) #if($game.h) #set($komi = $komi - $math.floor($komi)) #end
Handicap $game.h  ‐  Komi $komi
Round $round
Surround winner's name or ½-½
White
$white.name $!white.firstname #rank($white.rank)
#if($white.country)($white.country.toUpperCase()#if($white.club), $white.club#end)#end
##
$white.egf
½-½
Black
$black.name $!black.firstname #rank($black.rank)
#if($black.country)($black.country.toUpperCase()#if($black.club), $black.club#end)#end
##
$black.egf
Signature:
   
Signature:
#if($foreach.index % 4 == 3)
#end #end