{% extends "base.html" %} {% block title %}Комнаты - Капитал & Рынок{% endblock %} {% block content %}
💰 Комнаты
{% if current_user.is_authenticated %} {{ current_user.username }} {% endif %}

📢 Доступные комнаты

{% if rooms %} Найдено {{ rooms|length }} комнат {% else %} Нет доступных комнат {% endif %}
    {% if rooms %} {% for room in rooms %}
  • {{ room.player_count }}
    {{ room.name }} Месяц {{ room.current_month }}/{{ room.total_months }}
    Создатель: {{ room.creator.username if room.creator else 'Система' }} • Игроков: {{ room.player_count }}/{{ config.MAX_PLAYERS_PER_ROOM }}
    {% if room.settings %}
    {% set settings = room.settings|from_json %} {% if settings.allow_loans %} Кредиты {% endif %} {% if settings.allow_black_market %} Чёрный рынок {% endif %}
    {% endif %}
    {% if room.status == 'waiting' %} Ожидание {% elif room.status == 'playing' %} Игра идет {% elif room.status == 'full' %} Заполнена {% else %} {{ room.status }} {% endif %}
  • {% endfor %} {% else %}
  • 🏢

    Пока нет доступных комнат

    Создайте первую комнату!

  • {% endif %}

⭐ Ваши комнаты

{% if user_rooms %}
    {% for room in user_rooms %}
  • {{ room.player_count }}
    {{ room.name }} {% if room.creator_id == current_user.id %} Админ {% endif %}
    Месяц {{ room.current_month }}/{{ room.total_months }} • Игроков: {{ room.player_count }}/{{ config.MAX_PLAYERS_PER_ROOM }}
    {% if room.status == 'waiting' %} Ожидание {% elif room.status == 'playing' %} В игре {% else %} {{ room.status }} {% endif %}
  • {% endfor %}
{% else %}
👤

Вы пока не участвуете в комнатах

Присоединитесь к существующей или создайте свою

{% endif %}

⚡ Быстрые действия

{% if current_user.is_authenticated %}

📊 Ваша статистика

{{ current_user.total_games }}
Всего игр
{{ current_user.games_won }}
Побед
{% if current_user.total_games > 0 %} {{ "%.1f"|format(current_user.games_won / current_user.total_games * 100) }}% {% else %} 0% {% endif %}
Процент побед
{{ current_user.total_earnings|format_currency }}
Заработано
{% endif %}
{% endblock %} {% block scripts %} {% endblock %}