{% extends 'Game/index.html.twig' %} {% block title %} - Battle Report{% endblock %} {% block metas %} {%- set shareUrl = url('MineSeekerBundle_battle_share', { uuid: game.uuid }) | replace({'http://': 'https://'}) -%} {%- set _ogImage = url('MineSeekerBundle_og_battle', { uuid: game.uuid }) | replace({'http://': 'https://'}) -%} {% endblock %} {% block body %}
Battle Report
{% if redAvatar %} {{ redName }} {% else %} {{ redName|slice(0,2)|upper }} {% endif %} {% if redBonusPoints > blueBonusPoints %}
{% endif %}
{{ redName }} Red
{% if redPts is not null and bluePts is not null %}
{{ redPts }} : {{ bluePts }}
{% else %}
— : —
{% endif %}
{{ (redBonusPoints ?? 0)|number_format(1, '.', '') }} : {{ (blueBonusPoints ?? 0)|number_format(1, '.', '') }}
VS
{% if resign == 'red' %}
Blue wins
{% elseif resign == 'blue' %}
Red wins
{% elseif redPts is not null and bluePts is not null %} {% if redPts > bluePts %}
Red wins
{% elseif bluePts > redPts %}
Blue wins
{% else %}
Draw
{% endif %} {% endif %}
{% if blueAvatar %} {{ blueName }} {% else %} {{ blueName|slice(0,2)|upper }} {% endif %} {% if blueBonusPoints > redBonusPoints %}
{% endif %}
{{ blueName }} Blue
{% if resign %}
{{ resign|capitalize }} resigned
{% endif %} {% if game.redExplodedBomb %}
{{ redName }} hit a mine
{% endif %} {% if game.blueExplodedBomb %}
{{ blueName }} hit a mine
{% endif %} {% if game.updated %}
{{ game.updated|date('Y-m-d H:i') }}
{% endif %}
{# Bonus Stats Section #} {% set hasRedStats = redBonusStats is not empty and (redBonusStats.blindHits or redBonusStats.chainBest or redBonusStats.edgeMines or redBonusStats.lastMineHits or redBonusStats.biggestReveal) %} {% set hasBlueStats = blueBonusStats is not empty and (blueBonusStats.blindHits or blueBonusStats.chainBest or blueBonusStats.edgeMines or blueBonusStats.lastMineHits or blueBonusStats.biggestReveal) %} {% if redBonusPoints > 0 or blueBonusPoints > 0 or hasRedStats or hasBlueStats %}
Bonus Statistics
{# Red Bonus #}
{{ redBonusPoints|number_format(1, '.', '') }} pts
{% if redBonusStats is not empty and redBonusStats.blindHits %}
Blind hits {{ redBonusStats.blindHits }}
{% endif %} {% if redBonusStats is not empty and redBonusStats.chainBest %}
Best chain {{ redBonusStats.chainBest }}
{% endif %} {% if redBonusStats is not empty and redBonusStats.edgeMines %}
Edge mines {{ redBonusStats.edgeMines }}
{% endif %} {% if redBonusStats is not empty and redBonusStats.lastMineHits %}
Endgame mines {{ redBonusStats.lastMineHits }}
{% endif %} {% if redBonusStats is not empty and redBonusStats.biggestReveal %}
Biggest reveal {{ redBonusStats.biggestReveal }}
{% endif %} {% if not hasRedStats %}
No bonuses earned
{% endif %}
{# Blue Bonus #}
{{ blueBonusPoints|number_format(1, '.', '') }} pts
{% if blueBonusStats is not empty and blueBonusStats.blindHits %}
Blind hits {{ blueBonusStats.blindHits }}
{% endif %} {% if blueBonusStats is not empty and blueBonusStats.chainBest %}
Best chain {{ blueBonusStats.chainBest }}
{% endif %} {% if blueBonusStats is not empty and blueBonusStats.edgeMines %}
Edge mines {{ blueBonusStats.edgeMines }}
{% endif %} {% if blueBonusStats is not empty and blueBonusStats.lastMineHits %}
Endgame mines {{ blueBonusStats.lastMineHits }}
{% endif %} {% if blueBonusStats is not empty and blueBonusStats.biggestReveal %}
Biggest reveal {{ blueBonusStats.biggestReveal }}
{% endif %} {% if not hasBlueStats %}
No bonuses earned
{% endif %}
{% endif %}
{% endblock %}