File tree Expand file tree Collapse file tree
codeclash/viewer/templates/includes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ <h2>🎯 Detailed Rounds</h2>
2424 {% if round_data.results.winner and round_data.results.scores %}
2525 {%- set total_games = round_data.results.scores.values() | sum -%}
2626 {%- set winner = round_data.results.winner -%}
27- {%- if winner != 'Tie' -%}
27+ {%- if winner != 'Tie' and total_games > 0 -%}
2828 {%- set winner_wins = round_data.results.scores.get(winner, 0) -%}
2929 {%- set ties = round_data.results.scores.get('Tie', 0) -%}
3030 {%- set win_percentage = ((winner_wins + 0.5 * ties) / total_games * 100) | round(1) -%}
@@ -34,13 +34,19 @@ <h2>🎯 Detailed Rounds</h2>
3434 {{- score -}}
3535 {%- if not loop.last -%}-{%- endif -%}
3636 {%- endfor -%})
37- {%- else -%}
37+ {%- elif winner == 'Tie' and total_games > 0 -%}
3838 - Winner: Tie
3939 {%- if round_data.results.p_value is not none %} (p={{ "%.2f"|format(round_data.results.p_value) }}){% endif %} (
4040 {%- for player, score in round_data.results.scores.items() -%}
4141 {{- score -}}
4242 {%- if not loop.last -%}-{%- endif -%}
4343 {%- endfor -%})
44+ {%- else -%}
45+ - No games played yet (
46+ {%- for player, score in round_data.results.scores.items() -%}
47+ {{- score -}}
48+ {%- if not loop.last -%}-{%- endif -%}
49+ {%- endfor -%})
4450 {% endif %}
4551 {% endif %}
4652 </ summary >
You can’t perform that action at this time.
0 commit comments