<%def name="scoreboard(game_type_cd, pgstats, show_elo=False)"> ${scoreboard_header(game_type_cd, pgstats[0])} % for pgstat in pgstats: % if pgstat.avg_latency is not None: % else: % endif ${scoreboard_row(game_type_cd, pgstat)} % if show_elo: % if pgstat.elo_delta is not None: % else: % endif % endif % endfor
% if pgstat.player_id > 2: ${pgstat.nick_html_colors()|n} % else: ${pgstat.nick_html_colors()|n} % endif ${int(round(pgstat.avg_latency))} ${pgstat.score}${round(pgstat.elo_delta,2)}-
##### SCOREBOARD HEADER ##### <%def name="scoreboard_header(game_type_cd, pgstat)"> % if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel': Nick % if pgstat.avg_latency is not None: Ping % endif Kills Deaths Suicides Score % if show_elo: Elo Change % endif % endif % if game_type_cd == 'ctf': Nick % if pgstat.avg_latency is not None: Ping % endif Kills Captures Pickups FCK Returns Score % if show_elo: Elo Change % endif % endif % if game_type_cd == 'ca': Nick % if pgstat.avg_latency is not None: Ping % endif Kills Score % if show_elo: Elo Change % endif % endif % if game_type_cd == 'freezetag': Nick % if pgstat.avg_latency is not None: Ping % endif Kills Deaths Suicides Score % if show_elo: Elo Change % endif % endif ##### SCOREBOARD ROWS ##### <%def name="scoreboard_row(game_type_cd, pgstat)"> % if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel': ${pgstat.kills} ${pgstat.deaths} ${pgstat.suicides} % endif % if game_type_cd == 'ctf': ${pgstat.kills} ${pgstat.captures} ${pgstat.pickups} ${pgstat.carrier_frags} ${pgstat.returns} % endif % if game_type_cd == 'ca': ${pgstat.kills} % endif % if game_type_cd == 'freezetag': ${pgstat.kills} ${pgstat.deaths} ${pgstat.suicides} % endif