#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

#stop #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($explain = $api.get("tour/${params.id}/explain/$round"))
#foreach($white in $explain.paired) #end #foreach($black in $explain.paired) #foreach($white in $explain.paired) #if($white.id != $black.id) #set($key = "$white.id-$black.id") #set($weights = $explain.weights[$key]) #if($weights) #set($toMax = $explain.max - $weights.total) #set($toMin = $weights.total - $explain.min) #if ($toMax > $toMin) ## total is close to min #set($percent = ($weights.total - $explain.min) / ($explain.low - $explain.min) * 40) #else ## total is close to max #set($percent = 60 + 40 * (1 - ($explain.max - $weights.total) / ($explain.max - $explain.high)) ) #end #end #set($game = $explain.games[$key]) #else #end #end #end
$white.name $white.firstname
$white.toPrettyString()
$black.name $black.firstname
$black.toPrettyString()
#if($weights)$weights.toPrettyString()#{else}Bye Player#end