{% extends 'layout.html.twig' %} {% block stylesheets %} {{parent()}} {% endblock %} {% block body %} {{ parent() }}
{# SLIDER #}
{# ENDSLIDER #} {% set userTurn = 0 %} {% set self_points = 0 %} {% set rival_points = 0 %} {% set rival_picture = 0 %} {% set rival_name = 0 %} {% set rival_ronda = 0 %} {% set user_ronda = 0 %} {# partidas activas #}

{% trans %}PARTIDAS ACTIVAS{% endtrans %}

{% for duel in duels_active %} {% if duel.lastPlayerId == app.user.id %} {% set userTurn = 1 %} {% endif %} {% for attempt in duel.attempts %} {% if attempt.user.id == app.user.id %} {% for tracking in attempt.tracking %} {% set user_ronda = user_ronda + 1 %} {% endfor %} {# {% set userTurn = 1 %} #} {% else %} {% for tracking in attempt.tracking %} {% set rival_ronda = rival_ronda + 1 %} {% endfor %} {% endif %} {% if attempt.user.id == app.user.id %} {% set self_points = attempt.selfpoints %} {% endif %} {% if attempt.user.id != app.user.id %} {% set rival_points = attempt.selfpoints %} {% set rival_picture = attempt.user.image %} {% set rival_name = attempt.user.name %} {% endif %} {% endfor %}

{{ rival_name }}

{{ self_points }} - {{ rival_points }}

{#

Ronda actual: {{ user_ronda }} - {{ rival_ronda}}

#}
{% if userTurn == 0 %}
{% trans %}Tu Turno{% endtrans %}
{% trans %}Play{% endtrans %}
{% else %}
{% trans %}Turno del rival{% endtrans %}
{% trans %}Play{% endtrans %}
{% endif %}
{% set userTurn = 0 %} {% set finished = 0 %} {% set self_points = 0 %} {% set rival_points = 0 %} {% endfor %}
{# end partidas activas #} {# partidas terminadas #} {% set finished = 0 %}

{% trans %}PARTIDAS TERMINADAS{% endtrans %}

{% for duel in duels_end %} {% for attempt in duel.attempts %} {% if attempt.user.id == app.user.id and attempt.hasRecords == 1 %} {% set finished = 1 %} {% endif %} {% if attempt.user.id == app.user.id %} {% set self_points = attempt.selfpoints %} {% endif %} {% if attempt.user.id != app.user.id %} {% set rival_points = attempt.selfpoints %} {% set rival_picture = attempt.user.image %} {% set rival_name = attempt.user.name %} {% endif %} {% endfor %}

{{ rival_name }}

{{ self_points }} - {{ rival_points}}

{% if finished != 1 %}
{% trans %}Play{% endtrans %}
{% else %}
{% trans %}Play{% endtrans %}
{% endif %}
{% set finished = 0 %} {% set self_points = 0 %} {% set rival_points = 0 %} {% endfor %}
{# end partidas terminadas #}
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}